Sleep sort should be preferred over permutation sort as it has better time complexity.

Sleep sort should be preferred over permutation sort as it has better time complexity.
A. true
B. false
 
Answer: b
Explanation: If we sort an array using sleep sort then there is no guarantee that the output we get is correctly sorted. So even though sleep sort is better than bogosort in time complexity but it cannot be preferred due to its inaccuracy.
 

Tìm kiếm

Back
Top