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.
This comment is hidden because it contains spoiler information about the solution
Thank you
Hi. Have a look at the documentation, where you may find some helpful tips: https://docs.codewars.com/training/troubleshooting/
Your problem is below this line:
Dunno, the Test pass without problems, the attempt dont. If someone can explain why this could happen, considering that also the right wording is produced (I could totally see that as an only me problem if the expected result isn't in the produced list, but it's right there) would be very much appreciated (:
Without the input too, there is no much that we can do to see if there is a problem or not.
Nothing broken... Please before posting issues look at the top of the page to see how many people passed the kata (6435 in Java; your language I suppose). If there were errors chances are somebody would have seen that before you:-)
Java
Language?
I think the randomizer is broken, he expect a word smaller that the one bigger found.
expected:<[ttggaepppssoojjccczwwjkkvvlllsllydddllteweeiiibbtttgtttdddjjjrrfffttcggbbvggnjjjmmaazssscrwwwmmkkppvulyiiyydkuwwussddfffkkrrrhhhtttyyywwophhhcvvvhhggjffjmmurrvvxxxmmallfffggeeeeeggghhhttjjooowuufffyyyyvvkkkkrssmssstttvoooxzzzvvvbbkbbyybbkkaaauuuuhvvvnnneeolllnfhhmmkkeeellbbwwwzzyyeudfffppopeeeppvffeeeeeeruurrppmyzzzqqfjjuujjjrrggxxxjjzyxxxrriigggwwooouuwwwqqpuffcczittbbfaacccaaaaasssuuusscccjhhheeebbdssnneegggdddkkfzwwnnwwffjjhheeewiiierrcccmmjjjffrrqhrrtttyywwvvbbdffuuuotiifaapqqqqqukkiimmzzdddhhaaakbbbtttvvqkkhhmmmvviixduccxqqihhbbboooczzzooosssssxiijkqllgghhddbbiizzwttjjffrrrooonnzztccqqzrrrxxrrxxxzzzjjoojmgwwqdffomezcisssxxxttfvttjtwwwzuuuxxfffaauubcpppdddllggppggarryyrrsssdmmmuuccmmmlyyhhheeeggqqqzzzuuppooggjjjrttfhhjjbbbmmoouddzzoooiiizjjuddssnnqwkklleeqqffwffllbbkkoooccttxnndbbyyxvvttfsttynnllgggdrrrwxjjxxhhhacckkfppqqkkknnnjjjyyyyyjhhhhhxsiioiiirrllxxxhhzzziicckkkyyhmmfffqqqolssccggszzzrryyyoxxauurppylllnyvvwwtttssskkkcccjnaqqjoooeeeppprrcccnnawwwrrcccpptttrrhkkbbbaaavwwiiinnqqiibyypsshsffflhhlfffhssllllbbbnfffoooddzzzeeeiirllixxlyyoxxxzzseeicccddttysgggdjyddtttqqffytaahhllljjjjjvvffqkkoopjyhhhpppvvttvaammmedjhhifxxxfzmmwwgggcllggmvvvufffpppffrjiickkkiiyyggqqifffddwwkksskywwwjjoggacbbuuvvmoogdggiisssnobuuudmmmjjnnnvvwwwjjrrrjjjyyyrrrklluqqkkwqqqhhznndddssiivhkkmvhdeeyyrrrkvvhheegyyeeerrroopppccvvbbjcckkkkpsssttbbqjjqqqffccbyyeerbbbffdddkkkwuhhggzxgggjjgggeemmssffekkkkkcywwwwaaxxnnnyytqq]> but was:<[yyyjjjxxzzzqhhuyyoyyeellvvbbbssggpppmmooossllxqqqnnllvvqqqmmkkksskkhhbbgccrrfeuuiiwwiidddgnnuuxxmmmibbbuulooyyygaaaxxaqqaaatrrrlluumttdllliirrruxxwwvviiffppggqqjjnnsssbddaahhhvvvyynnnznnooogggqnnndmmwehffuuymmooxxsssawwwyyeeebbatttddddxoqquuurrpammooowsspmmkkyppqqqqqqldvooonnviiaazleeesssqqkkkooogkkduhhhummttggaepppssoojjccczwwjkkvvlllsllydddllteweeiiibbtttgtttdddjjjrrfffttcggbbvggnjjjmmaazssscrwwwmmkkppvulyiiyydkuwwussddfffkkrrrhhhtttyyywwophhhcvvvhhggjffjmmurrvvxxxmmallfffggeeeeeggghhhttjjooowuufffyyyyvvkkkkrssmssstttvoooxzzzvvvbbkbbyybbkkaaauuuuhvvvnnneeolllnfhhmmkkeeellbbwwwzzyyeudfffppopeeeppvffeeeeeeruurrppmyzzzqqfjjuujjjrrggxxxjjzyxxxrriigggwwooouuwwwqqpuffcczittbbfaacccaaaaasssuuusscccjhhheeebbdssnneegggdddkkfzwwnnwwffjjhheeewiiierrcccmmjjjffrrqhrrtttyywwvvbbdffuuuotiifaapqqqqqukkiimmzzdddhhaaakbbbtttvvqkkhhmmmvviixduccxqqihhbbboooczzzooosssssxiijkqllgghhddbbiizzwttjjffrrrooonnzztccqqzrrrxxrrxxxzzzjjoojmgwwqdffomezcisssxxxttfvttjtwwwzuuuxxfffaauubcpppdddllggppggarryyrrsssdmmmuuccmmmlyyhhheeeggqqqzzzuuppooggjjjrttfhhjjbbbmmoouddzzoooiiizjjuddssnnqwkklleeqqffwffllbbkkoooccttxnndbbyyxvvttfsttynnllgggdrrrwxjjxxhhhacckkfppqqkkknnnjjjyyyyyjhhhhhxsiioiiirrllxxxhhzzziicckkkyyhmmfffqqqolssccggszzzrryyyoxxauurppylllnyvvwwtttssskkkcccjnaqqjoooeeeppprrcccnnawwwrrcccpptttrrhkkbbbaaavwwiiinnqqiibyypsshsffflhhlfffhssllllbbbnfffoooddzzzeeeiirllixxlyyoxxxzzseeicccddttysgggdjyddtttqqffytaahhllljjjjjvvffqkkoopjyhhhppp]>
The expected word is 1418 chars
The found word is 1431 chars
(I checked also with printing the results, both words are in the list of words produced)
Something very wrong on that test
This comment is hidden because it contains spoiler information about the solution
Please, don't spoil the kata. Mark your post as having spoiler content next time.
This comment is hidden because it contains spoiler information about the solution
Yeah, in the end I changed something, considering the case of the test 2. Now it went completed, it may be not the cleanest one, but for a first try on performance I don't mind the result
Your problem occurs if the unique value is the last value in the array. If that happens, your function
getResult(occurrence, null)
is called. In that case, you are creating a Listsurvivor
and populating it with every key that occurs in in your keylist1
time, which will be all of them. Keys naturally appear in HashMaps only once. The test that you are failing, the array is[8.0, 8.0, 8.0, 8.0, 8.0, 8.0, 8.0, 7.0]
. Right before you return your value,survivor
is[8.0, 7.0]
. I think what you wanted to do was get the key inoccurrence
where the value is1
, however, you never actually update any key inoccurrence
to have a value of more than1
at any time.Loading more items...