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.
While I agree it can be improved as you said, I consider something as a kata issue if the user can't fix it changing his/her code. In this case, the problem comes from the user returning a different datatype from the expected one, and it can be fixed by the user, returning the expected one.
I would still consider crashing tests a kata issue. If tests want to use the returned value in a non-trivial way, it should be sanitised and not cause a crash.
Well, you're returning a list instead of a number, that's your code's problem, not a kata issue.
This is what you have to figure out by yourself. The description gives all the elements to find the result. Minimum height posible just means what it says: if you find some combination but there exists another possibility that satisfies all the other requirements with 1st being lower, then your solution is incorrect. It's not as obvious as one could think at first sight, but I think any hint would definitively spoil the solution. If you cannot find it out, a good option can be to move on to other katas. Someday maybe the answer will pop into your mind with clarity.
see comments in the fork
Apologies, fixed the typo, should now read:
('01222',2) creates 5 strings ("01,12,22,22,20")
Thanks!
These equations hold for integers
_
is actually the var identifier. other symbols are bitwise operators, exactly equivalent to the computation youu see in the top solution (but the 2 terms of the multiplication are reversed, and no need for parentheses because of the precedence of bitwise operators)(convoluted answer to avoid the spoiler flag, but you should be able to find your way from there)
You have to mutate the input if it's not wave sorted and not change it otherwise. You don't have to return anything.
Read that again.
raise Exception('error message')
those are red users. Without red account, use the filters in the katas page (second icon in the vertical left bar)
It's O(n^2), and it's possible to do it in O(1).
Your code seems to be not fast enough. Try doing it in another (faster) way.
Loading more items...