[Python] Easy-to-understand solution explained
Steps:\n1. Count the number of occurrences of every letter.\n2. Sort in alphabetic order.\n3. Follow the procedure defined in the problem statement.\npython\nde
Steps:\n1. Count the number of occurrences of every letter.\n2. Sort in alphabetic order.\n3. Follow the procedure defined in the problem statement.\n```python\ndef sortString(self, s: str) -> str:\n    d = sorted([c, n] for c, n in collections.Counter(s).items())\n    r = []\n    while len(r) < len(s):\n        for i in range(len(d)):\n            if d[i][1]:\n                r.append(d[i][0])\n                d[i][1] -= 1\n        for i in range(len(d)):\n            if d[~i][1]:\n                r.append(d[~i][0])\n                d[~i][1] -= 1\n    return \'\'.join(r)\n```\nVote up if you find this helpful, thanks!
['Python', 'Python3']