The Problem Here’s a problem I was asked recently: Write a function permute such that: permute(‘abc’) → ['abc', 'acb', 'bac', 'bca', 'cab', 'cba'] Now, immediately this should look like a recursive problem. Put in English, we want to do the following: Iterate through the initial string – e.g., ‘abc’. For each character in the initial [...]
Posts