1.

It is not possible to implement counting sort when any of the input element has negative value.(a) True(b) FalseThe question was asked in an interview.This intriguing question originated from Sorting topic in section Sorting of Data Structures & Algorithms II

Answer»

Right CHOICE is (b) False

The BEST I can explain: 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.



Discussion

No Comment Found

Related InterviewSolutions