Hi @khulood1027 ,
Please refer to this post for further clarity: Incorrect Robot Scan Values in ROS Basics Course - Wall Follower Robot / TurtleBot3
The scan degrees for the robot start with 0 on the back.
So:
0 degrees / 0 ray index = back
90 degrees / 180 ray index = right
180 degrees / 360 ray index = front
270 degrees / 540 ray index = left
360 degrees / 719 ray index = back (again)
I hope this clarifies your doubts.
Regards,
Girish