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'm glad it helped :D
In example tests function vodkaConsumption was calling twice on the same array.
In your solution you have change array values to integer which doesnt have "indexOf" method.
Im not an expert but arrays are pass into the function as reference so if you change passed array inside the function you affect that array outside that function.
I have update test cases.It got me some time to figure it out.You can send your solution now.
Cheers!
This comment is hidden because it contains spoiler information about the solution
I pass all the cases, I just get an error:
Value is not what was expected ---> how can I possibly know what this is?
What are the rotors for the multi-line test cases? That should be given so we can troubleshoot.
Yes
Great, you got it! Made minor alteration to my code and it now passes.
I figured it out. It's fairly simple, it's asking for the highest sequence of five numbers within the code (without rearranging it).
Good luck
Look at my suggestion above. they're asking for the highest sequence of five numbers, not for you to re-arrange it and find the highest numbers within the argument.
I figured it out, here's what I wrote:
For everybody who gets 99999 instead of 99890, here is some help:
THE INSTRUCTIONS ARE VAGUE. Here is an example, let's say they gave the number: 9834775899890938471234
At first, I initially understood it as re-arranging all the numbers and finding the highest numbers within that.
In this case it would be "99999".
But it's actually asking for the highest SEQUENCE of 5-numbers in a row.
In this case, it would be "99890".
That is the difference, and I got it right. I hope this helps.
For everybody who gets 99999 instead of 99890, here is some help:
THE INSTRUCTIONS ARE VAGUE. Here is an example, let's say they gave the number: 9834775899890938471234
At first, I initially understood it as re-arranging all the numbers and finding the highest numbers within that.
In this case it would be "99999".
But it's actually asking for the highest SEQUENCE of 5-numbers in a row.
In this case, it would be "99890".
That is the difference, and I got it right. I hope this helps.
Same issue... Did you guys figure it out?
I understand your question and I have the same problem.
"99999" isn't included as substring in the input number (string), so your result is wrong. "99890" is included and it's the highest value of all 5 digit substrings, so it's the correct solution for this testcase (don't understand your question, but hope it helps;-))...
I know some other people are experiencing this too. I don't understand how my code could be incorrect with the following error message.
solution did not return correct value - Expected: 99890, instead got: 99999
If my code returns 99999, then wouldn't that mean the largest 5 digit number (from the same group of digits that contains the expected "99890") is actually 99999 ?
Please HELP!
p.s passing everything else, and works for me locally, have tried a lot of different tests.
Loading more items...