Ad
  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar
  • Custom User Avatar

    Hi. Have a look at the documentation, where you may find some helpful tips: https://docs.codewars.com/training/troubleshooting/

  • Custom User Avatar

    Your problem is below this line:

    //We dont want to outIndex
    
  • Default User Avatar

    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 (:

  • Custom User Avatar

    Without the input too, there is no much that we can do to see if there is a problem or not.

  • Default User Avatar

    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:-)

  • Default User Avatar
  • Custom User Avatar
  • Default User Avatar

    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

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Please, don't spoil the kata. Mark your post as having spoiler content next time.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    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

  • Default User Avatar

    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 List survivor and populating it with every key that occurs in in your keylist 1 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 in occurrence where the value is 1, however, you never actually update any key in occurrence to have a value of more than 1 at any time.

  • Loading more items...