Ad
  • Default User Avatar
  • Default User Avatar

    I don't understantd your answer, In my case, Matthew and Elizabeth get the same score, so it's Elizabeth's win because E is comming before M.

    In the next example, you have the same case :
    rank("Aubrey,Olivai,Abigail,Chloe,Andrew,Elizabeth", [3, 1, 4, 4, 3, 2], 4), "Abigail"), Abigail and Chloe get the same score and it's Abigail's win.

    There is something that I don't understand.

    EDIT : I'm a stupid monkey, I got it, sorry for my useless comment

  • Default User Avatar

    If you're talking about this test case → rank("Elijah,Chloe,Elizabeth,Matthew,Natalie,Jayden", [1, 3, 5, 5, 3, 6], 2), "Matthew")

    Elizabeth is indeed before Matthew but the test asks for the one in 2nd place. Hence, Matthew is the correct answer.