Which of the following is the Best Case Time Complexity Quicksort algorithm?
- O(n log n²)
- O²(n log n)
- O(n log n)
- None of these
Explanation
- Best case occurs when the pivot divides the array into two equal halves each time.
- This leads to a balanced recursion tree.
- Hence, Quick Sort runs in O(n log n) time in the best case.
Additional information:
- Average case → O(n log n)
- Worst case → O(n²)
- Example size: n = 8 → log₂(8) = 3 levels
- Total comparisons ≈ n log n
Last verified on 24-03-2026
Related MCQs
ایچ ڈی ایم آئی کیبل کا کیا کام ہے؟
- To connect audio and video devices
- To transmit internet signals
- To connect storage devices
- None of these
اس سوال کو وضاحت کے ساتھ پڑھیں
بٹ کوائن کس ٹیکنالوجی کو استعمال کرتا ہے؟
- Hashgraph
- Blockchain
- DAG
- None of these
اس سوال کو وضاحت کے ساتھ پڑھیں
فشنگ عام طور پر کس مقصد کے لیے کی جاتی ہے؟
- Install legitimate updates
- Improve computer performance
- Obtain sensitive information through deceptive messages or websites
- None of these
اس سوال کو وضاحت کے ساتھ پڑھیں
مضبوط پاس ورڈ کا بنیادی مقصد کیا ہے؟
- Protect an account from unauthorized access
- Improve screen resolution
- Increase internet speed
- None of these
اس سوال کو وضاحت کے ساتھ پڑھیں
براؤزر میں بک مارک کا بنیادی مقصد کیا ہے؟
- Remove viruses
- Delete browsing history
- Save a webpage for easier future access
- None of these