Skip to content

Latest commit

 

History

History
15 lines (11 loc) · 426 Bytes

File metadata and controls

15 lines (11 loc) · 426 Bytes

Problem 18: The Permutation Machine (String Permutations)

Problem Statement

Given a string s, return all possible permutations of its characters using recursion. You can return the answer in any order.

Input Format

  • A string s with distinct characters.

Constraints

  • 1 <= s.length <= 6
  • All characters of s are unique.

Example

Input: s = "abc"
Output: ["abc","acb","bac","bca","cab","cba"]