i need to get a string and rearrange it with recursion by getting char and by that char i have to move that char everywhere on the string to the end
like \"Hello world!\" ,\'l\
If you use while loop and write a method to check if that string means perfect statement then that may work for you
Here you would need some help of NLP concept to check everytime if arranged chars are making any statement or are grammatically correct.
This will help