Which of the following is the Average Case Time Complexity fo the Bubble sort algorithm?
مندرجہ ذیل میں سے ببل سورٹ الگورتھم کے اوسط کیس ٹائم کمپلیکسٹی کیا ہے؟
- O(n²)
- O(n)
- O²(n)
- None of these
Explanation
- Bubble Sort repeatedly compares and swaps adjacent elements until the array is sorted.
- Average case involves roughly n(n-1)/2 comparisons, which gives O(n²) time complexity.
- Best case: O(n) if the array is already sorted (with optimized check).
- Worst case: O(n²) when the array is reverse sorted.
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 *