Find next greater number with same set of digits; Print all permutations of a string in Java; Generate all permutation of a set in Python; Permutations of a given string using STL; Anagram Substring Search (Or Search for all permutations) Heap's Algorithm for generating permutations; Print all distinct permutations of a given string with duplicates To understand this program you should have the knowledge of following Java Programming topics: For loop in Java; Java String split() method; Java String charAt() method; Example: Program to reverse every word in a String using methods. In this Program, we first split the given string into substrings using split() method. Sep 07, 2011 · So for string "abc", the idea is that the permutations of string abc are a + permutations of string bc, b + permutations of string ac and so on. The following piece of a code is a very efficient use of recursion to find the possible permutation of a string. Caution : However, this solution does not take care of duplicates. It is assumed that ... Jan 16, 2003 · If InStr (1, Ztring, " ", vbTextCompare) = 0 Then. PermuteString = Base & " " & Ztring & vbCrLf. Exit Function. End If. ' If more than 1 element: split elements in one array of elements. TmpStrArray = Split(Ztring, " ", , vbTextCompare) If Base = "" Then. ' Loop trough each element and do callbacks to permute again.