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 think you should limit below 0 and upper 255
Hey. I don't know how it's in JS, but in Swift a tuple is an anonimous objest with syntax (index1: Int, index2: Int)
I also got confused with this moment. The author ment an array of ints.
This comment is hidden because it contains spoiler information about the solution
yeah, totally true. No actual example in mind, mostly an almost random thought...
care to mention which exactly? sounds like domain specific use case, I referred only to general use cases
(unless you achieve better time complexity and the inputs are large enough. Very "large enough", sometimes... x) )
any builtin is faster than whatever equivalent of it you try to recreate because builtins use c implementations and skip the whole 'handling useless calls from outer layer' part
Likely because it has been highly optimized over the many years it has existed and it was probably written by someone a lot smarter than anyone here .
Generally it isn't worth it to go so deep that you are re-inventing the wheel.
I don't know all that much Python. I suggest you just look at the other solutions and take inspiration from them. You can even vote on which one you think is best or most creative.
What programming language is it? And what is wrong with your code? Which test is it failing or what error message is it coming with?
If the code works and you just want to see other people's solutions, go to the Solutions tab and you can see how others solved this Kata.