Mock ALPHA doubt

in this josephus problem...shouldnt the answer be 45 ?

normally we take n=2^m + r.... through which we get position by doing 2r+1

so here 150= 128+22 ----->> 2(22)+1=45

so why 44 ?

1

Please log in to comment and participate in discussions.

Comments (2)

Here, the first card is eliminated, so the formula is different.

Use this - Surviving card = 2 × (N − Highest power of 2 less than or equal to N)

If the question has used standard Josephus problem, the second card is eliminated first, rather than the first

Question would be:

A pile of 150 cards is numbered 1 to 150 from top to bottom. The following is done repeatedly: the top card is moved to the bottom of the pile, and then the next card is thrown away.

This continues until only one card is left. What is the number on that card?

2

Ohh... Got it

Tysmmm !!

1