Need help with a question

Revision en1, by MankS, 2023-02-23 14:14:05

So i recently came across this question:- You are given values 1 2 3 4 5 6 7 8 9 10 11 .... In each iteration all nth values are removed. n starts from 2 and goes on. So the numbers after first iteration are 1 3 5 7 9 11 13 15 17 ...as all second values are removed Now in next iteration all 3rd values are removed,therefore we have 1 3 7 9 13 15 ... And so on. Given a number,tell whether it will be removed or stay in the series,and if it is removed,then in which iteration. It would be great if I could get help in knowing the approach and resources if any for this question. Thanks a lot.

Tags help, adhoc, need guidance

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English MankS 2023-02-23 14:14:05 631 Initial revision (published)