adding programs for sorting array by frequence and leaders in array