100 People in a Circle — Puzzle for Interview rounds

Question :

100 people standing in a circle in an order 1 to 100.

No.1 has a sword.

He kills next person (i.e. no. 2) and gives sword to next to next (i.e no.3).

All person does the same until only 1 survives.

Which number survives at the last?

Solution :

  • Round 1 : 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99
  • Round 2: 1, 5, 9, 13, 17, 21, 25, 29, 33, 37, 41, 45, 49, 53, 57, 61, 65, 69, 73, 77, 81, 85, 89, 93, 97
  • Round 3: 1, 9, 17, 25, 33, 41, 49, 57, 65, 73, 81, 89, 97
  • Round 4: 9, 25, 41, 57, 73, 89
  • Round 5: 9, 41, 73
  • Round 6: 9, 73
  • Round 7: 73

Thanks for Reading

Placewit grows the best engineers by providing an interactive classroom experience and by helping them develop their skills and get placed in amazing companies.

Learn more at Placewit. Follow us on Instagram and Facebook for daily learning.

--

--

--

Upskilling students for tech placements!

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

“5 Things I Wish Someone Told Me Before I Became CEO of The Free Mama Movement,” With Lauren Golden

Being the only female engineer at a startup doesn’t have to be shitty…

Part II: What I learnt from communicating the values of a rapidly-growing start up

JPMAP FEU launches webinar on how to deal with rejection

10 Tips for Facilitating a Successful Conference Call.

Why I quit my job after 5+ years for a 100% remote position

Women of The C-Suite: “Let go of trying to do it all” With Dale Sperling, CMO at STASH

Why You Need Vulnerability

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Placewit

Placewit

Upskilling students for tech placements!

More from Medium

Scattered Rice Coding Question

Class Quiz

Monkey Door Puzzle

Longest Common Subsequence