Solution: Permutations
Statement
Given an input string, word
, return all possible permutations of the string.
Note: The order of permutations does not matter.
Constraints:
-
All characters in
word
are unique. -
word.length
-
All characters in
word
are lowercase English letters.
Level up your interview prep. Join Educative to access 80+ hands-on prep courses.