← Zoho questions

Last Ant on the Rod

Filed under Zoho

N ants are placed on a rod of length N+1 at positions 1 to N. They move left or right and swap directions upon collision. Determine which ant is the last to fall off the rod; if two fall…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Zoho questions

Collected from public candidate posts and coding forums. Updated Nov 2026.