...

/

Challenge: Permutation of an Array

Challenge: Permutation of an Array

Complete the permutation of an array challenge.

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.

Access this course and 1400+ top-rated courses and projects.