Prints all distinct permutations in str [ 0. . n - 1 ]
void findPermutations ( char str [ ] , int index , int n ) { if ( index >= n ) { cout << str << endl ; return ; } for ( int i = index ; i < n ; i ++ ) {