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.
Cool solution! Deserves more clever points, IMHO
If you reversed your x and y to match the bug in my error log, please think of reporting it in the comments next time
;)
(I felt very stupid noticing it one year after x.o)
If there are duplicate entries you should just keep the one with the highest score.
Return as much results as possible, in the test case just 1.
"Should equal" is the result you are expected to give. You need to sort them alphabetically also, that's why Frank is before Frodo.
Works properly now for me too. Good job fixing it.
@zigi84, try again now.
I've noticed, another fix has been proposed which might work. This ingenious programming language design where you have to implement your own string sorting is killing me. I hope it's gonna work after the next JS version update.
Sorry, but that "fix" does not fix it. I'm still failing because the test solution is placing "Jarod" ahead of "Jackson" (for example) in alphabetical order.
I have absolutely no idea what's happening. This is the algo:
And still it doesn't sort the array adequately
:\
I still failed about a dozen tests.
Expected: [['Judy', 102], ['Jared', 102], ['Jet', 102], ['Joe', 102], ['John', 102], ['Jude', 102], ['Jackson', 101], ['Jill', 101], ['Jeremy', 100], ['Joel', 100], ['Josephine', 100]], instead got: [['Jared', 102], ['Jet', 102], ['Joe', 102], ['John', 102], ['Jude', 102], ['Judy', 102], ['Jackson', 101], ['Jill', 101], ['Jeremy', 100], ['Joel', 100], ['Josephine', 100]]
Should be correct now. Try again.
The problem was because of strange behaviour in JS compared to Python. Forming a new list by extracting highest records, one by one, works perfectly fine in Python and gives us a properly sorted list, but JS for some reason forms a new array changing the order of the entries
:\
Now it should be fixed. Try again.
.
Damn it, issue is still not fixed. Hope the author will approve the fixed translation soon.
FIX ADDRESSING THE "NOT ALPHABETICALLY SORTED" ISSUE. Please, approve it.
Can't pass the random tests in JS. I'm assuming they should be sorted alphabetically when the score is the same, but random test results are not sorted this way.
Expected: [['Jared', 102], ['Jude', 102], ['Joel', 102], ['Jet', 102], ['Josephine', 102], ['Jackson', 102], ['Jill', 101], ['Jeremy', 101], ['John', 101], ['Joe', 100], ['Judy', 100]], instead got: [['Jackson', 102], ['Jared', 102], ['Jet', 102], ['Joel', 102], ['Josephine', 102], ['Jude', 102], ['Jeremy', 101], ['Jill', 101], ['John', 101], ['Joe', 100], ['Judy', 100]]
Loading more items...