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
- Format
- Modify
- Draw
- Tools
اس سوال کو وضاحت کے ساتھ پڑھیں
- Trim
- Offset
- Extrude
- Fillet
اس سوال کو وضاحت کے ساتھ پڑھیں
بڑی اسکرین پر ویڈیو تصاویر دکھانے کے لیے کون سا آؤٹ پٹ ڈیوائس استعمال ہوتا ہے؟
- Scanner
- Printer
- Projector
- None of these
اس سوال کو وضاحت کے ساتھ پڑھیں
اینٹی وائرس سافٹ ویئر کا کیا کام ہے؟
- Protect against malware and viruses
- Manage email accounts
- Create and edit spreadsheets
- None of these
اس سوال کو وضاحت کے ساتھ پڑھیں
کمپیوٹر کو ایک الیکٹرانک ڈیوائس کے طور پر کیسے بیان کیا جا سکتا ہے؟
- Carry out arithmetic operations
- Carry out logical operations
- Do complicated calculations
- Accept and process by implementation sequentially a set of stored instructions