Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Hi,
I need your help with one test case:
Test.assert_equals(josephus([1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],40),[10, 7, 8, 13, 5, 4, 12, 11, 3, 15, 14, 9, 1, 6, 2], "Should work for larger ks too")
I am getting an "IndexError: pop index out of range", when the value of 'K' exceeds the count of elements in the source list. Is having 'K' (ie: more people to kill) than the number of items (ie: the people to kill), a valid scenario?