Challenge 2: Print all Permutations of a String
For this challenge, you will be given an array and its length, and you must print out all the permutations of the array.
A permutation is an arrangement of all or part of a set of objects. For example,- the arrangement of words ‘cat’ and ‘act’ represent two distinct permutations (or arrangements) of a similar three letter word.
The illustration below explains the concept.