Given an array nums of distinct integers, return all the possible permutations. You can return the answer in any order. Create a recursive function that takes the input array, a current permutation, ...
The algorithm returns an array of all the possible permutations (not combinations because order matters here) of x elements (x being one of the algorithm's parameters) in any given array of size n.
Some results have been hidden because they may be inaccessible to you
Show inaccessible results