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.
I enjoyed this challenge but it's a bit confusing to see that the best answers are using built-in functions. I believe this kata is a 3 kyu challenge only if you don't use these built-in functions.
I only found one exemple of such a syntax in python: itemgetter(1,3,5)('ABCDEFG'), yet I don't get it...
Thanks for your answer, it drove me to look for the meaning of first-class values and I learned a lot. However, I don't feel closer to the solution... I believe that I can use a recursive function to obtain the right chained() function. However I'm still stuck to run it on the input. I'd appreciate another hint!
I dont't understand how a function can be written like that in Python: chained([functions])(input) and I have no idea about how I can retrieve 'input' to pass it in the chain... If someone could give me a slight indication about where I should look for a solutionm I'd appreciate!
Thanks! I guess I didn't get what was the 'signature of the function'...
This comment is hidden because it contains spoiler information about the solution
Hey Redmega,
I like your Kata but I can't get the logic...
Here is were I got blocked:
10
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
[1, 3, 5, 7, 9]
[1, 4, 7, 10]
[1, 5, 9]
[1, 5, 9] should equal [1, 4, 9]
It says should equal: [1, 4, 9] but in this case it seems that the step 'i' is uneven... 1+3 = 4 and then 4+5 = 9 so 'i' equals both 3 and 4? Did I miss something in the notes? Something like he starts from the last locker he changed the state?