# Sleep Sort Multiple choice Questions and Answers (MCQs)

## Sleep Sort Multiple choice Questions and Answers (MCQs)

Congratulations - you have completed Sleep Sort Multiple choice Questions and Answers (MCQs).

You scored %%SCORE%% out of %%TOTAL%%.

Your performance has been rated as %%RATING%%

 Question 1 [CLICK ON ANY CHOICE TO KNOW MCQ multiple objective type questions RIGHT ANSWER]
Which of the following header file is a must to implement sleep sort algorithm?
 A string.h B math.hw C bios.h D windows.h
Question 1 Explanation:
To implement sleep sort algorithm we need functions like WaitForMultipleObjects(), ....beginthread(). These are included in the header file windows.h.

 Question 2 [CLICK ON ANY CHOICE TO KNOW MCQ multiple objective type questions RIGHT ANSWER]
Sleep sort does not work for .....
 A negative numbers B large numbers C small numbers D positive numbers
NTA NET study material
Question 2 Explanation:
Sleep sort algorithm does not work for negative numbers. It is because thread cannot sleep for negative amount of time.

 Question 3 [CLICK ON ANY CHOICE TO KNOW MCQ multiple objective type questions RIGHT ANSWER]
In how many comparisons does the array arr={1, 4, 2, 3, 5} gets sorted if we use sleep sort?
 A 5 B 3 C 1 D 0
UPSC FREE STUDY
Question 3 Explanation:
Sleep sort makes different elements of the array to sleep for an amount of time that is proportional to its magnitude. So it does not require to perform any comparison in order to sort the array.

 Question 4 [CLICK ON ANY CHOICE TO KNOW MCQ multiple objective type questions RIGHT ANSWER]
Sleep sort works by .....
 A making elements to sleep for a time that is proportional to their magnitude B making elements to sleep for a time that is inversely proportional to their magnitude C partitioning the input array D dividing the value of input elements
NTA NET study material
Question 4 Explanation:
In sleep sort each element is made to sleep for a time that is proportional to its magnitude. Then the elements are printed in the order in which they wake up.

 Question 5 [CLICK ON ANY CHOICE TO KNOW MCQ multiple objective type questions RIGHT ANSWER]
Sleep sort code cannot compile online because .....
 A it has very high time complexity B it has very high space complexity C it requires multithreading process D online compilers are not efficient