Sort the following array of key values by means of counting sort.

Click an element in the Input array. This makes the corresponding key value visible. The visible key values can be drag and dropped either into Auxliary Table or Output.

  1. Each time an element is drag & dropped into Auxliary Table, the number of corresponding elements is increased by one. The result is the distribution of the key values.
  2. After this, the items in Auxliary Table can be dragged and dropped on top of each other in order to add a value to another one. The idea is to calculate the cumulative distribution of the key values.
  3. This cumulative distribution can be used to determine the correct Output position for each key value in the Input array. Each time an element is added to Output, the corresponding item in Auxliary Table is decreased by one.

Some additional problems.