I have a big array like that :
var tableau = ["Salut", "Hey", "Salut", "Hey", "Hey", "Mom", "Hey", "Dad", "Mom", "Hey", "Plop"]
And now I want an array with each word sort by the number of repeats so an Array like that :
var tableauTrier = ["Hey", "Salut", "Mom", "Dad", "Plop"]
How can I use the least memory to sort them ? Help me please !