Challenge: Permutation of an Array
Complete the permutation of an array challenge.
We'll cover the following
Permutation of an array
Write a Java code to print out all the permutations of a given array with repetition.
Recursive solutions must cater to the String
concatenation.
For example, let the string be xyz
, and all the permutations with repetition must be printed. The code should print the following:
xyz xzy yxz yzx zxy zyx
Note: Don’t worry if you need help. You can see the solution by pressing the “Show Solution” button.
Get hands-on with 1400+ tech skills courses.