The visualizations here are the work of David Galles. Counting Sort. Counting sort is a sorting technique which is based on the range of input value. Counting sort is a stable sorting technique, which is used to sort objects according to the keys that are small numbers. Quick Sort is another Divide and Conquer sorting algorithm (the other one discussed in this visualization page is Merge Sort). Five algorithms were added: Counting Sort, Merge Sort (Double Storage), Radix Sort, Smoothsort, and Timsort. In computer science, counting sort is an algorithm for sorting a collection of objects according to keys that are small integers; that is, it is an integer sorting algorithm. Counting Sort html5 visualization Demonstration applet from Cardiff University Kagel, Art S. (2 June 2006), "counting sort", in Black, Paul E. For example, assume that we are asked to sort n elements, but we are informed that each element is in the range of 0-k, where k is much smaller than n.We can take advantage of the situation to produce a linear - O(n) - sorting algorithm.That's Counting sort.. We will see that this deterministic, non randomized version of Quick Sort can have bad time complexity of O( N 2 ) on adversary input before continuing with … In Counting sort, the frequencies of distinct elements of the array to be sorted is counted and stored in an auxiliary array, by mapping its value as an index of the auxiliary array. It operates by counting the number of objects that have each distinct key value, and using arithmetic on those counts to determine the positions of each key value in the output sequence. Counting Sort. a visualization of the most famous sorting algorithms. Counting Sort, similar to Pigeonhole Sort, is a sorting algorithm which is not a comparison sort, so it uses about 2n comparisons (for finding the minimum and maximum in the first pass) when sorting the data. It counts the number of keys whose key values are same. It is used to sort elements in linear time. trace of item moved forward¹ trace of item moved backward¹ item in memory comparison indicator current operation end / sequence sorted max number of inversions starting number of inversions ¹color of trace = color of moved item (ed. ), Dictionary of Algorithms and Data Structures , U.S. National Institute of Standards and Technology , retrieved 2011-04-21 . In Counting sort, we maintain an auxiliary array which drastically increases space requirement for the algorithm implementation Algorithm Visualizations. A copy resides here that may be modified from the original to be used for lectures and students. This sorting technique is effective when the difference between different keys are not so big, otherwise, it can increase the space complexity.