Find the Runner-Up Score!

  • + 2 comments

    The problem with this implementarion is the complexity. You are doing it in O(n²), while you can do this in O(n). Even sorting the list have a better complexity O(n*log(n)). An example of a patological case is the list [5, 5, 5, 5, 5 ,6] or something like that.