Problem: https://leetcode.com/problems/sort-characters-by-frequency/description/ Code: class Solution: def frequencySort(self, s: str) -> str: c = Counter(s) sorted_c = sorted(c.items(), key=lambda x : (-x[1], x[0])) #1st sort by ...
is-power-of-two.hashnode.dev2 min readNo responses yet.