Skip to content

TheCodingBook

  • Home
  • Basic
  • Classic
  • Challenge
  • Subscribe

median

Challenge: Find Median in Linear Time

February 6, 2022February 1, 2022 by AlgoExpert

Question: A straightforward way to find a median from a list of numbers would be to first sort the list and then pick the middle element. Using this approach, the time complexity would be dominated by the sorting algorithm, which is O(n log n). Now, your task is to find a median in a linear … Read more

Categories Challenge Tags challenge, linear time, median Leave a comment
© 2022 TheCodingBook • Built with GeneratePress