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.
(1) and (3) are overrated, and (1) should not have been translated to Python ( or at least certain imports should have been forbidden ).
I don't have an opinion on (0) or (2) because I've never been able to solve them.
The specs say that case must not exist. Which makes it perfectly valid to optimise for the specs, and check the base case after the first iteration.
Haskell translation
I think so, yes. There are solutions to
Become Immortal
which make the kata look like it could have been 6kyu. There are many other kata whose solutions can be much simpler than their rank might imply.Having said that, even the naive approach to this kata should be able to solve it with just a a few loops and simple variables. No advanced algorithms are needed, there's no hidden information. There are tools that make it easier if you know about them, but even without them I think this should be a 6kyu at best, and I think 7kyu is fine.
approved
Java translation
I thought it was a fun problem, but also felt it was probably a 5 or 6 kyu. I know that's feedback which has already been given.
If there isn't one already, I'd suggest a test case which has a single element array. Most base case conditions seem to use array.length==1, which has that kind of input as a potential vulnerability.