Given an array of distinct integers, the task is to return all possible permutations of the array. The permutations can be returned in any order.
Click Run to execute sample tests.