Ad
  • Custom User Avatar

    Cool solution! Deserves more clever points, IMHO

  • Custom User Avatar
    // x and y are inversed!!!
    

    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)

  • Default User Avatar

    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.

  • Default User Avatar

    Works properly now for me too. Good job fixing it.

  • Custom User Avatar

    @zigi84, try again now.

  • Custom User Avatar

    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.

  • Default User Avatar

    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.

  • Custom User Avatar

    I have absolutely no idea what's happening. This is the algo:

    1) sort records
    2) extract records until they end/you hit the limit
    3) sort new array (added with the fix which reduced the number of fails)
    

    And still it doesn't sort the array adequately :\

  • Custom User Avatar

    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]]

  • Custom User Avatar

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

  • Custom User Avatar

    Now it should be fixed. Try again.

  • Custom User Avatar

    .

  • Custom User Avatar

    Damn it, issue is still not fixed. Hope the author will approve the fixed translation soon.

  • Custom User Avatar
  • Custom User Avatar

    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...