import java.util.ArrayList;
import java.util.Map;
import java.util.TreeMap;
/**
*
* @author Youssef Ali (https://github.com/youssefAli11997)
*
*/
class CountingSort {
/**
* This method implements the Generic Counting Sort
*
* @param array The array to be sorted
* @param last The count of total number of elements in array
* Sorts the array in increasing order
* It uses array elements as keys in the frequency map
**/
public static