All permutations of a string

Problem Statement: http://www.ardendertat.com/2011/10/28/programming-interview-questions-11-all-permutations-of-string/

Time complexity: O(N!)

tes

       t
      / \
     e   s
    / /
   s e

       e
      / \
     t   s
    / /
   s t

       s
      / \
     t   e
    / /
   e t


Comments