Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Clear solution in Clear category for Sort Array by Element Frequency by ksc38317
def frequency_sort(items):
count = [ [x, items.count(x)] for i, x in enumerate(items)
if items[0:i+1].count(x) == 1]
sort = sorted(count, key = lambda x: x[1], reverse = True)
return [x for x,y in sort for n in range(y)]
Aug. 4, 2019