Question
1.
2.
3.
4.
Answer (Detailed Solution Below)
Option 3 : O(n²) / O(n²)
Advertisement
Detailed Solution
सही उत्तर O(n²) / O(n²) है।
Key Points
Helpful?
Question:
The worst-case time complexity of quicksort is: / क्विकसॉर्ट की निकृष्टतम-स्थिति समय जटिलता है:
1.
O(n log n) / O(n log n)
2.
O(n) / O(n)
3.
O(n²) / O(n²)
4.
O(log n) / O(log n)
Correct Answer: O(n²) / O(n²)
When the pivot is repeatedly the smallest or largest element, quicksort degrades to O(n²). / जब पिवट बार-बार सबसे छोटा या बड़ा तत्व हो, तो क्विकसॉर्ट O(n²) हो जाता है।
Downloaded from PrepSnap (prepsnap.in)