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.
You say that the middle term is the one at the center, so m != n/2, m == (n+1)/2
But how to exchange the letters, and when do I should stop?
What means middle term? and if n is odd, how to proceed?
In "abcd", n = 4 => 4/2 = 2, there are 2 changes, but in "abcdx", n = 5 => 5/2 = 2.5, there are 3 changes. So how many changes should do if n is odd, or if n is par?
I think there is a mistake with the examples. going(8) => 1.146652, but in the example is 1.146651.
I use Ruby
names = ["Sheldon", "Leonard", "Penny", "Rajesh", "Howard"]
Who is the first in the queue? => "Sheldon"?
Who is the next will drink the first cola? => "Sheldon"?
Who is the next will drink the 10-th cola? => "Penny"?
names = ["Penny", "Rajesh", "Rajesh", "Howard", "Howard", "Sheldon", "Sheldon", "Sheldon", "Sheldon", "Leonard", "Leonard", "Leonard", "Leonard", "Penny", "Penny"]
What happens if I pass an empty list of names?
What happens if I pass 0 as the umpteenth cola?
how does it work? Any documentation that support this assumtion... =)