What is the space complexity of the merge sort algorithm?
- O(n)
- O(n log n)
- O(n²)
- None of these
Explanation
- Merge Sort requires extra memory to merge sorted subarrays.
- It is not an in-place algorithm.
- Therefore, its space complexity is O(n) for an array of size n.
Additional information:
- Time complexity (Best) → O(n log n)
- Time complexity (Average) → O(n log n)
- Time complexity (Worst) → O(n log n)
- Recursion stack → O(log n)
Last verified on 24-03-2026
Related MCQs
وہ پروسیسر یونٹ جو کمپیوٹر کے تمام آپریشنز کو کنٹرول، ہم آہنگ اور ہدایات دیتا ہے، اسے کیا کہتے ہیں؟
- Cache memory
- Arithmetic unit
- Control unit
- None of these
اس سوال کو وضاحت کے ساتھ پڑھیں
ایرک کیا ہے؟
- Plagiarism technique in research
- Database in education
- Software
- None of these
اس سوال کو وضاحت کے ساتھ پڑھیں
ریم سے کیا مراد ہے؟
- Random Access Memory
- Random Access Money
- Random Accurate Memory
- None of these
اس سوال کو وضاحت کے ساتھ پڑھیں
اگر آپ قریب کی دو عمارتوں کو جوڑنا چاہتے ہیں تو آپ مندرجہ ذیل میں سے کون سا نیٹ ورک استعمال کریں گے؟
- Metropolitan Area Network (MAN)
- Local Area Network (LAN)
- Wide Area Network (WAN)
- None of these
اس سوال کو وضاحت کے ساتھ پڑھیں
ڈیجیٹل سگنلز کو اینالاگ سگنلز میں تبدیل کرنے والی ڈیوائس کا کیا نام ہے؟
- Router
- Switch
- Modem
- None of above
اس سوال کو وضاحت کے ساتھ پڑھیں
Leave a Reply
Your email address will not be published. Required fields are marked *