Find the Median

  • + 1 comment

    I tried this using the Quick Select algorithm but I made the partitions using Hoare's partioning algorithm rather than lomuto and it timed out.

    Now I tried it using lomuto and all cases passed with test case #4 taking the longest which was 0.01 seconds.

    I wonder why Hoare's took longer...it's supposed to have much fewer comparisons...about 1/3rd.