Ad
  • Custom User Avatar

    This is a 6 kyu, not a total beginner kata, you should know how to sort and how builtin sort algorithms work.

  • Custom User Avatar

    You were taught wrong. The JS spec did not specify a stable sort until, as mentioned, Node 12.x, so using legacy Node versions, you have to take that into account. Teachers that overlooked this did you a disservice.

  • Custom User Avatar

    If a homebrew bubble sort worked for you and library sort did not, it most probably means that sort was not applied correctly.

    What would be a reason to have sort at all if something as bad as bubble sort would work better that it?