Which sorting algorithm has the best worst-case time complexity?
بدترین حالت میں وقت کی پیچیدگی کے لحاظ سے سب سے بہتر ترتیب دینے کا طریقہ کون سا ہے؟
- Merge Sort
- Bubble Sort
- Selection Sort
- None of these
Explanation
- Merge Sort has the best worst-case time complexity: O(n log n).
- It uses the Divide and Conquer technique.
- It divides the array into smaller parts, sorts them, and then merges them.
Additional information:
- Bubble Sort: O(n²)
- Selection Sort: O(n²)
- Insertion Sort: O(n²) (worst case)
- Quick Sort: O(n²) (worst case), O(n log n) (average)
Last verified on 18-07-2026
Related MCQs
ٹھ کے ڈسپلے کی معیاری پکسل ریزولوشن کتنی ہوتی ہے؟
- 1920 x 1080
- 3840 x 2160
- 7680 x 4320
- 1024 x 768
اس سوال کو وضاحت کے ساتھ پڑھیں
ڈی وی ڈی کس چیز کی مثال ہے؟
- Hard disk
- Optical Disk
- Output devices
- Solis-State Storage Devices
اس سوال کو وضاحت کے ساتھ پڑھیں
ڈیٹا میں ردوبدل کو اور کیا کہا جاتا ہے؟
- Data Processing
- Data Storage
- Data Mining
- Data Retrieval
اس سوال کو وضاحت کے ساتھ پڑھیں
ورلڈ وائیڈ ویب کو رابرٹ کیلِیو کے ساتھ کس نے ایجاد کیا؟
- Tom Burne
- Tim Burner Lee
- Fred Zuckerberg
- Both a and b