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.
Yes it is
Yup, that's the math way to do it.
Hello, thank you for your answer.
I just saw the example tests:
names1 = ["Sheldon", "Leonard", "Penny", "Rajesh", "Howard"]
r1 = 1
res1 = "Sheldon"
names2 = ["Sheldon", "Leonard", "Penny", "Rajesh", "Howard"]
r2 = 6
res2 = "Howard"
names3 = ["Sheldon", "Leonard", "Penny", "Rajesh", "Howard"]
r3 = 10
res3 = "Penny"
Test.assertEquals(whoIsNext(names1, r1), res1)
Test.assertEquals(whoIsNext(names2, r2), res2)
Test.assertEquals(whoIsNext(names3, r3), res3)
Your ruby and java version have r=6 , res=Sheldon indeed, maybe it's a cache thing or something because it has been a while since I've tried to solve it.
This comment is hidden because it contains spoiler information about the solution