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
سمورغ نامی سپر کمپیوٹر کس ملک نے تیار کیا ہے؟
- China
- Japan
- Iran
- None of these
اس سوال کو وضاحت کے ساتھ پڑھیں
سی پی یو کے اندر کون سی میموری نصب ہوتی ہے؟
- RAM
- ROM
- Register
- None of these
اس سوال کو وضاحت کے ساتھ پڑھیں
ورلڈ وائیڈ ویب کو رابرٹ کیلِیو کے ساتھ کس نے ایجاد کیا؟
- Tom Burne
- Tim Burner Lee
- Fred Zuckerberg
- Both a and b
اس سوال کو وضاحت کے ساتھ پڑھیں
مصنوعی ذہانت کا بانی کسے کہا جاتا ہے؟
- Mark Zuckerberg
- Alan Turing
- John McCarthy
- Bill Gates
اس سوال کو وضاحت کے ساتھ پڑھیں
کمپیوٹر گرافکس کا بانی کسے کہا جاتا ہے؟
- Charles Babbage
- Alan Turing
- Ivan Sutherland
- None of these