Skip to content

Latest commit

 

History

History
12 lines (6 loc) · 456 Bytes

File metadata and controls

12 lines (6 loc) · 456 Bytes

String Permutation

Goal: Use Python to implement String Permutation

Overview

Given a string, write a function that uses recursion to output a list of all possible permutations of that string. For example, given s='abc' the function should return ['abc', 'acb', 'bac', 'bca', 'cab', 'cba']

Note: If a character is repeated, treat each occurence as distinct, for example an input of 'xxx' would return a list with 6 "versions" of 'xxx'

See Also