## Buy/Download all MCQ Ebook
>>>**Click Here**<<<

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

## Click on any option to know the CORRECT ANSWERS

Question 1 |

How many comparisons will be made to sort the array arr={1, 5, 3, 8, 2} using counting sort?

5 | |

7 | |

9 | |

0 |

**Management Questions answers**

Question 1 Explanation:

As counting sort is an example of non comparison sort so it is able to sort an array without making any comparison.

Question 2 |

Which of the following is not an example of non comparison sort?

bubble sort | |

counting sort | |

radix sort | |

bucket sort |

**GK Questions answers**

Question 2 Explanation:

Bubble sort is not an example of non comparison sort as it needs to compare array elements in order to sort an array.

Question 3 |

Which of the following sorting techniques is most efficient if the range of input data is not significantly greater than a number of elements to be sorted?

selection sort | |

bubble sort | |

counting sort | |

insertion sort |

**KBC Questions answers**

Question 3 Explanation:

Time complexity of counting sort is given as O(n+k) where n is the number of input elements and k is the range of input. So if range of input is not significantly larger than number of elements in the array then it proves to be very efficient.

Question 4 |

What is the auxiliary space requirement of counting sort?

O(1) | |

O(n) | |

O(log n) | |

O(n+k) k=range of input |

**KBC Questions answers**

Question 4 Explanation:

Counting sort uses two extra arrays to get the input array sorted. First array is required to store the count of all the elements which fall in the range of input data elements, so its size is k. The second array is required to store the input elements in sorted manner, so its size is n. Thus overall auxiliary space required becomes O(n+k).

Question 5 |

It is not possible to implement counting sort when any of the input element has negative value.

True | |

False |

**Sociology Questions answers**

Question 5 Explanation:

It is possible to extend the counting sort algorithm for negative numbers as well. In such a case we store the minimum element at the 0th index.

There are 5 questions to complete.