← Amazon questions
Codingeasy

Last person remaining in a queue after selective removals

Filed under Amazon

A queue of people is lined up numbered 1 to n. In each round, only people at even positions are kept, and the rest are removed. This process repeats until a single person remains. Determine the…

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 Amazon questions

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