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.
ayoo
That's not one of the basic tests, copy/paste it to sample tests to see your code fail and debug it.
Your code is wrong, not a kata issue. It fails tests like this one:
The code in PyCharm gives you the correct result, but in the tests it is not correct. What could be the error?
print(longest_consec(['ahhhyaann', 'xxpppojta', 'ttiicccxnnnzz', 'eeeraafnbbddqii', 'jwwwsppc', 'uubddy', 'vvvaaaamww', 'zzzhbee', 'yybbbcjjqqqqq', 'kkyygnnn', 'oonghhh', 'vessh', 'ttllae', 'bbbqqqegggm', 'uxfffxxcuuurrrhh', 'ufrrrvvvnfffx', 'bbhhhnnn', 'lllcccekaa', 'zzqqquuugggpaaa', 'zzeeewwuuuvv', 'kkkuujqq', 'diiigggooo', 'rrruuuiiyyoooaaakkiiwww', 'qqdddhhbbuuu', 'cbvvqqqgggee', 'aaaveee', 'zzfffnnnrnoo', 'tttaaauupssswfff', 'nnnnllled', 'jaaaennnyyp', 'llljuuhhhww', 'wwzzzmmmk', 'swwwjjn', 'ccnnnqqqfffoooko', 'obbkkxxddd', 'qlluujjcccjssseeep', 'aamjj', 'aaarrrmmmbhh', 'brrrdvvc', 'mmmtuu', 'fffssnnneuuq', 'rrtttv', 'ggtbbbttooh', 'nnnwwtttlfff', 'ppttttwaaa', 'fnntccckllttt', 'ggooouppp', 'vvhhhdddso', 'xxxnnooqqfjjj', 'cztf', 'fffuubbbb', 'crrrnn', 'sswfooff', 'jjjgggkktttaxxoozz', 'llttyy', 'ymln', 'kkggyyygvvvvvf', 'hhfffimmmvvvsss', 'xjjjkyfqq', 'jyyssddlla', 'hhhrzzzttt', 'eewwbeeq', 'xxfffccbpvvvu', 'ffvvvggggggvf', 'ffofffdddvvqq', 'ffxpppssstttl', 'yyymmkkkzziii', 'ygga', 'feetttcc', 'rrrjdddzqqqfgg', 'vvvssuuuj', 'ssbbbccqkk', 'sazzzvvrrrexbb', 'kkwwwrycs', 'fiyyyaaa', 'sbbbpp', 'oooeeennnoo', 'uuuuuqqqw', 'ndddqqqkh', 'qqqoorm', 'kenncccllqqtx', 'kcccellljsslll', 'qvvvvmmmee', 'eeennnqqqnmmm', 'eovgkkkhhh', 'mnnnkkaaa', 'hhhlbbeeepppw', 'qqqaabbbpppht', 'iicd', 'kkiikj', 'riiii', 'fffoccclwee', 'xxdxxzzzkkzzz', 'hhhccuweeekkk', 'zzzoobbfffllj', 'jkkkggg', 'dvuu', 'iibffwwll', 'yyvff', 'ahhiiipppqqq', 'zzppcccffcchhmmmm', 'wwwxxxpppnnnbyyy', 'ppnnniyyfffn', 'qqzziiu', 'xxxmmmvnnnoww', 'yyzxxl', 'bbjwwtttdp', 'cccnefooojttt', 'mppps', 'mmaasaa', 'wwweeezkqqqo', 'unnoddttt', 'kkjjjcccaaayyy', 'qqehhn', 'rryyjjjfgggvvv', 'gxi', 'pppbbbssjh', 'xiddddhh', 'eeotttfffcc', 'kkkjhooovvvvv', 'qfcccvvvjjj', 'xxxqcjjjummooo', 'reyyy', 'fooeeesssw', 'ttrrpppeyyy', 'hhhdddmmmgnn', 'hrnyyyyttz', 'ddqqaayyyyy', 'hhvaaawwnnnooo', 'ccsskkkuu', 'aaffqqhssjjjjp', 'leeeraaabbkkk', 'vvvyyshhhssse', 'fzzmmmfff', 'fvooyyygbbdnppp', 'hhsssdddhhh', 'pjjjccclllsss', 'yyydddaaauuubbrrrvv', 'xxxrrn', 'lllzzzxxooqqa', 'yyyvyyyr'], 17))
uxfffxxcuuurrrhhufrrrvvvnfffxbbhhhnnnlllcccekaazzqqquuugggpaaazzeeewwuuuvvkkkuujqqdiiigggooorrruuuiiyyoooaaakkiiwwwqqdddhhbbuuucbvvqqqgggeeaaaveeezzfffnnnrnootttaaauupssswfffnnnnllledjaaaennnyypllljuuhhhww
Good kata though my solution is too long compare to others , i felt stupid LOL
niceee
okayy serr.. GG
Just Wow
what a goat!!
what a goat!
Ohh okay thanks for explanation. I'll try to figure out again. thanks
You can't convert an array to
null
. You can return whatever you want, if your array doesn't contain something correct, just returnnul
. Or better, try to catch when you should returnnull
and leave the array.This comment is hidden because it contains spoiler information about the solution
Because your function returns
[NaN, NaN, NaN]
when it should returnnull
.Why i got [Nan,Nan,Nan] instead of 'null'?
This one is hard for me
Loading more items...