Problem
Given an arraynums of distinct integers, return all the possible permutations. You can return the answer in any order.
Examples
Constraints
- 1 <= nums.length <= 6
- -10 <= nums[i] <= 10
- All the integers of nums are unique.
Tested Python solution for LeetCode 46 with 12 pytest cases. Generate a practice environment with lcpy.
nums of distinct integers, return all the possible permutations. You can return the answer in any order.