MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi test

Learn moreOpportunities for recent engineering grads.

Apply TodayThe Josephus Challenge is to find the position that is the last remaining when every Kth item is removed from a list of N items. The removal wraps from the end to the start.

**Input:** N, K where N is the number of players and K is the removal period.

**Output:** S the last position remaining

**Example:** N=4 K=2 produces the sequence

1 2 3 4; 1 3 4; 1 3; 1

**Comment:**

This is a replication of Decimation by James but has a different Historical story reference.

24 correct solutions
41 incorrect solutions

Last solution submitted on Mar 17, 2016

1 player likes this problem

4 Comments