I want to implement this without using the sorted function (perhaps by using a priority queue):
nums = [2,3,1,3,2] dic=collections.Counter(nums) sorted_dic= dict(sorted(dic.items(),key=lambda x: x[1]))
548k questions
547k answers
4 comments
48.7k users