結果 : sort elements of an array by frequency using hash table