Find the Median

  • + 2 comments

    The problem statement clearly says: "Can you figure out a way to use your partition code to find the median in an array?"

    Yet most people seem to just use sort in their submission. That seems to totally miss the point!

    The grader should be fixed such that a solution that uses sort in O(nlog(n)) would time out, whereas one with partition only, O(n) would pass.