What is the time complexity of Quick Sort in the best-case scenario?

  • O(log n)
  • O(n log n)
  • O(n)
  • O(n^2)
The best-case time complexity of Quick Sort is O(n log n). This occurs when the pivot element chosen during partitioning consistently divides the array into roughly equal halves, leading to efficient sorting in each recursive call.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *