Ad
  • Default User Avatar

    try this to measure time :

    %timeit

    I did it on the solution that I implemented (based on a sort) and found it OK in performance compared to other solutions.
    For ex on a 1-million items list: time to execute with sort = 3 ms, time to execute with solution with sets = 8 ms
    for whatever that's worth ...