What is the overall time complexity of the merge sort algorithm?
مرج سورٹ الگورتھم کی مجموعی ٹائم کمپلیکسٹی کیا ہے؟
- O(n log n)
- O²(n log n)
- O(n log n²)
- None of these
Explanation
- Merge Sort is a divide and conquer algorithm that splits the array into halves, sorts them recursively, and merges them.
- Each level of recursion processes n elements, and there are log₂n levels, giving O(n log n) time complexity.
- It is stable and works well for large datasets.
- Worst, average, and best case all have O(n log n) complexity.
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