# YOU CAN DOWNLOAD 200+ SUBJECTS PDF BOOK FOR COMPETITIVE EXAMINATIONS

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

Question 1 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER] |

Gnome sort is also called .....

Smart sort | |

Stupid sort | |

Bogo sort | |

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?

Single loop | |

2 nested loops | |

3 nested loops | |

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?

gnome sort and quick sort | |

merge sort and selection sort | |

gnome sort and merge sort | |

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 .....

O(1) | |

O(n) | |

O(log n) | |

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 .....

5 | |

6 | |

7 | |

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.