All arrangements of a word
hardRecursion40 XP
Return every different arrangement of the letters of s, each once, sorted alphabetically. Letters may repeat in s.
Examples
- Input: s = "abc"Output: ["abc", "acb", "bac", "bca", "cab", "cba"]
- Input: s = "aab"Output: ["aab", "aba", "baa"]
Examples use JSON: true/false/null are True/False/None in Python.