Hello,
please tell me the algorithm on how to permute a string? like for abcd it should be abcd,abdc.....and ya i have solved this problem recursively. I want to do it in a non-recursive manner. First tell me it possible to generate such variable number of loops for permutation? Secondly i don't want to use any stack. The solution should be entirely based on pure loops only! Is it possible to do so!If yes then kindly give me the algorithm else give me hints that can be of any use to me
Thanks in advance!!