Permutation of a string in java using recursion
Tutorials Shared by the Internet Community
Total Hits - 31623
Total Votes - 19 votes
Vote Up - 11 votes
Vote Down - 8 votes
Domain - javahungry.blogspot.com
Category - JAVA/JAVA Misc
Submitted By - Java Hungry
Submitted on - 2014-04-02 06:19:56
Let us understand first , what we want to achieve . We want to write a function which prints all possible orderings of the characters in the string, in other words, print all permutations that use all the characters from the original string.
For example , given a string "sky" , our function should return
Output : "ysk","ksy","yks","kys","syk" and "sky" More detail...