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.
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!
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.
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;-))...