Simple Python3 solution with string/list manipulation
\nclass Solution:\n    def sortString(self, s: str) -> str:\n        \n        A = [a for a in s]\n        \n        res = []\n        while len(A)>0:          
```\nclass Solution:\n    def sortString(self, s: str) -> str:\n        \n        A = [a for a in s]\n        \n        res = []\n        while len(A)>0:            \n            M=list(set(A))\n            M.sort()        # Unique characters of (remaining) string, sorted\n    \n            # Pick smallest->largest\n            for c in M:\n                res.append(c)\n                A.remove(c)\n\n            # Check if something is left from the original string (list)\n            M = list(set(A))\n            M.sort()\n\n            # Pick largest->smallest from what\'s left\n            for c in M[::-1]:\n                res.append(c)\n                A.remove(c)\n\n        return \'\'.join(res)\n```
[]