Prove that COUNTING-SORT is stable.
see the above proof it might help
http://www.personal.kent.edu/~rmuhamma/Algorithms/MyAlgorithms/Sorting/countingSort.htm
64.3k questions
77.9k answers
244k comments
80.0k users