Permutation of a string in java using recursion

Tutorials Shared by the Internet Community


Permutation of a string in java using recursion

Find Permutation and Combination of a String , such type of questions can be asked in the written round of the major tech giants like Amazon.


  • Total Hits - 32659

  • Total Votes - 19 votes

  • Vote Up - 11 votes

  • Vote Down - 8 votes

  • Domain -

  • 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.<br />For example , given a string "sky" , our function should return<br /><br />Output : "ysk","ksy","yks","kys","syk" and "sky"    More detail...

Broken  |   Tweet  |   Facebook  |     |   Save  |   Liked  |   Down