Print all permutations of a string
The problem of printing all the permutations of a string is one of the wellknown problem of backtracking. Permutation is process to find all combinations in given string characters. For example.
Input : "ABC"
Output : ABC
ACB
BAC
BCA
CBA
CAB
Using of factorial(n) we can find the number of permutations of string here n indicates number of characters in string. In above example length of text is 3 so (3 * 2) = 6.
We can write an efficient algorithm which are takes O(!n) time to printing all the permutable result. Here given code implementation process by using recursion.

1) Print all permutations of a string in java
2) Print all permutations of a string in c++
3) Print all permutations of a string in c
4) Print all permutations of a string in c#
5) Print all permutations of a string in php
6) Print all permutations of a string in python
7) Print all permutations of a string in ruby
8) Print all permutations of a string in scala
9) Print all permutations of a string in swift
10) Print all permutations of a string in kotlin
11) Print all permutations of a string in node js
12) Print all permutations of a string in golang
13) Print all permutations of a string in vb.net
14) Print all permutations of a string in typescript
Please share your knowledge to improve code and content standard. Also submit your doubts, and test case. We improve by your feedback. We will try to resolve your query as soon as possible.
New Comment