Linear Time Algorithm for Identifying the