Software Development Interview Questions

36,990 software development interview questions shared by candidates

N people are sitting in a circle labelled 1 through n. They being counting 1,2,3,.... in a clockwise manner and every person that gets a number divisible by 3 is eliminated. Write a program to figure out which numbered person will remain. What's the time and space complexity?
avatar

Software Development Engineer

Interviewed at Microsoft

4
Apr 23, 2012

N people are sitting in a circle labelled 1 through n. They being counting 1,2,3,.... in a clockwise manner and every person that gets a number divisible by 3 is eliminated. Write a program to figure out which numbered person will remain. What's the time and space complexity?

Viewing 711 - 720 interview questions

Glassdoor has 36,990 interview questions and reports from Software development interviews. Prepare for your interview. Get hired. Love your job.