Gnome Sort Multiple choice Questions and Answers (MCQs)

YOU CAN DOWNLOAD 200+ SUBJECTS PDF BOOK FOR COMPETITIVE EXAMINATIONS

CLICK HERE TO DOWNLOAD

Gnome Sort Multiple choice Questions and Answers (MCQs)

Question 1 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Gnome sort is also called .....
A
Smart sort
B
Stupid sort
C
Bogo sort
D
Special sort
Question 1 Explanation: 
Gnome sort was originally named as stupid sort but later on it got renamed as gnome sort.

Question 2 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
How many loops are required to implement gnome sorting algorithm?
A
Single loop
B
2 nested loops
C
3 nested loops
D
It does not require any loop
Question 2 Explanation: 
In this sorting algorithm the variable representing the index number is not incremented in case the adjacent pair of elements are out of place. In such a case its value is decremented instead. Thus it is able to implement sorting using a single loop.

Question 3 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Which of the following pair of sorting algorithms are stable?
A
gnome sort and quick sort
B
merge sort and selection sort
C
gnome sort and merge sort
D
heap sort and merge sort
Question 3 Explanation: 
Gnome sort and merge sort are stable sorting algorithms as the elements with identical values appear in the same order in the output array as they were in the input array when any of these sorting algorithms are implemented.

Question 4 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Auxiliary space used by gnome sort is .....
A
O(1)
B
O(n)
C
O(log n)
D
O(n log n)
Question 4 Explanation: 
Auxiliary space used by gnome sort is O(1) as it does not use any extra space for manipulating the input. Thus it also qualifies as an in place sorting algorithm.

Question 5 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
The given array is arr = {1, 2, 4, 3, 5}.The number of iterations required to sort the array using gnome sort will be .....
A
5
B
6
C
7
D
8
Question 5 Explanation: 
6 iterations will be required as one pair of elements i.e. {4, 3} is out of place which causes the loop to take one step backward.

There are 5 questions to complete.