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.
Just found the mistake. My regex didn't match zeros and therefore it did not recognize +10 or -10 movements correctly. Sorry, my bad.
I have already reset, there still to many tests failing
Here is another test result:
expected [ 'l', 'e', 'Q', 'I', 'z', 'f', 'P', 'O', 'm', 'h', 'U', 'w', 'E' ] to deeply equal [ 'h', 'e', 'Q', 'I', 'z', 'f', 'P', 'O', 'm', 'U', 'l', 'w', 'E' ]
leaderboardSort(["l","z","f","e","O","m","P","I","U","h","w","E","Q"], ["Q +3","Q +5","I +2","h +10","f -4","P +1","z -5","f -1","O +1","Q +0","l -10","O -5","l +1"])
There is nothing smaller sorry
does not work for me. I carefully went through all changes by hand and I know my algo spits out the correct changes to the board. Test this my result is:
assert.deepEqual(leaderboardSort(["ivy","uQV","YiJ","pBO","uhU","RHK","zJx","bhQ","pcj","LbZ","QJv","usq","uZi","KFM"], ["QJv +9","uZi +8","pcj +8","usq +7","pcj -11","usq +3","uQV -3","bhQ +7","uhU +3","LbZ +8","LbZ -10","pcj +3","ivy -9","KFM +9"]), [ 'usq',
'QJv',
'bhQ',
'KFM',
'YiJ',
'uhU',
'uZi',
'pBO',
'uQV',
'pcj',
'ivy',
'RHK',
'zJx',
'LbZ' ]);
Result : [ 'pcj',
'QJv',
'usq',
'bhQ',
'KFM',
'LbZ',
'YiJ',
'uhU',
'uZi',
'uQV',
'pBO',
'ivy',
'RHK',
'zJx' ]