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.
Oh sorry, will handle it now
Added random tests and also generator tests
Thanks for the suggestion I already check for generation type.
Checking generation equality I assume is done by checking the lists
Thanks for contributing to the Kata :)
I will try to find some time today after work today to finish the test cases.
To be honest I wanted to use big numbers to force the users to use a generator and itertools instead of a large list, I think it is also faster.
That seemed like a hard one. My basic problem was running out of time. Had to find a clever way to generate. Could you elaborate more on your (impressive) solution?
Is there a Python solution? How can I code it in Python?
Nice Kata! I liked the formulation of the problem. Too many ideas for similar katas can grow from this one.
Feel free to check my Katas too they are still all on Beta!
Check your solution again it might be too slow, I added some more test cases.
Also please vote ;)
Thanks for the tip with indices made an excellent refactor
Should be OK now
Oups you got me again :) I will try to correct it. Feel free to contribute to this Kata if you want (Test cases, Translation to other languages, alternative solution etc.)
Thanks for pointint out you are right about it, need to correct it.
And also len([a::-999]) it is actually for the maximum distance of 1000 (a[1000]) plus the
distance of 1 (a[1]) thus 8000 + 8 = 8008
I added a max distance of 1000 constraint. You may need to adjust your code a bit to pass the test cases
I see your point. I will try to adjust the solution in light of your remarks.
Thanks for pointing that out, PEP8 should always be respected.
Actually, you must implement a "len" method yourself but I left it for the coder to be done.
I now added it to the initial solution.
I added a simple test case with a negative slide of -1 and another one where where start > end > 0 and slide < 0).
You don't have to support more complex negative slides. Beware to support cases like this Neighbors[::-1]
Thanks for giving it a try.
Loading more items...