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 guess because of this condition "The input array should not be modified!"
DUDE!!
is this what he meant when he said "If there are two or more characters with the same l return the first in order of appearance".
i wrote my solution so that "vbbvv"=> v:2, "bbvv"=>b:2, afezbbvvzzz=>z:3, this is what i understood from the description
i understood that if two characters have the same maximun number of occurence, the character that show up first in the string is what we should return
anyhow, thanks for your help i will rectify my mistake
When debugging your code, print the input, otherwise, how would you know why your code fails?
"bb"
is clearly before than"vv"
there. Now fix your code.This comment is hidden because it contains spoiler information about the solution
Please give examples of edge cases. Regards, suic
my solution works fine with the simple tests but when i attempt to solve the kata; apparently it give the wrong ansewer.
I tried my solution in eclipse on different edge cases examples that i thought of, and it always yields the correct answer, but it never seems to work with the random tests.
I've seen this with other katas and i don't think it's role of the persone trying to solve the problem to try come up with the obscure edge cases while the description for the problem is brief and short to say the least.
I think idealy the simple tests should include all the edge cases so that even with a brief description, the person trying to solve the problem can clearly understand what he's trying to acomplish.
still better than those hacky stream solutions
bruh, why is everyone making a copy of the array ????