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]))
755k questions
754k answers
5 comments
53.3k users