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.
your approach is totally wrong. Not an issue.
Description updated
looks like java is not your language
StackOverflowError :)
When no upper bound is given, you should assume the numbers may run up to an indefinite number of digits.
No.
After 1e5, it asks for one more result, zeros(1e9).
Your solution has to be O(log n), not O(n).
I think what's happening is that your code is appending the last vowel in your list to characters beyond the alphabet. Try building a test case or two that cover such cases.
I just added an example test case to cover accented characters. Here's the Java version of the new example test case...
Note: Not a spoiler... just an example test case. :)
I took a look at your solution. Your issue is the
static int ans
. Because is it global, when the other tests execute,ans
is never reset to0
again. I slightly changed your code and all the tests pass with this modification:It is not pretty, maybe you want to modify your recursion to not use a global.
OK, had a look at the Java test cases and I can't seem to see anything wrong with it. For your case, with
39
this is the actual test:assertEquals(3, Persist.persistence(39))
. So it is expecting3
given the input of39
. If it fails all the tests, then there must be something up with your solution. You can send me your code but then mark your comment as spoiler so I can have a look for you.I'm the original author and only created the Javascript solution. Let me have a look to see what's up.
Which language are you using for the kata? Does it fail in the Initial Tests or Random tests section?