31) D

The lift is currently on floor 7. Floor 4 and 10 are equal distance from the lift. However, there are more stops requested on floor 10 side. So the lift moves in the direction of floor 10. As soon as the lift moves, a request for floor 7 comes.
However, the lift will carry on moving towards floor 10. When it stops on floor 10, the closest stop will be floor 7. So it moves towards 7.
After 7, 4, then 0 then towards 14 and then 16. So 16 will be last stop.

All floors visited before 16 = 10, 7 (again), 4, 0, 14

It will visit 5 stops before 16. So the answer is D.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s