Find all permutations of a string

Recusive solution that uses O(n2) memory. A more memory effienct solution would use global state to flag which letters have been used while deeper in the call stack. I opted for a more functional solution without global state.

In C#:


Leave a comment -


I'm a .NET, PHP, Python, and Javascript developer. Also Project Manager, Scrum Master, and Juilliard trained violist. You cannot connect with me on Facebook, Twitter, or LinkedIn so don't ask.