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]))
2.1m questions
2.1m answers
60 comments
57.0k users