Given an array nums of distinct integers, return all of its permutations in any order.
nums
nums = [0,1]
[[0,1],[1,0]]
nums = [1]
[[1]]
1 <= nums.length <= 6 All integers in `nums` are unique.
Topics
Implement permute in the editor and return the answer — printing it is never graded.
permute
Problem 78 of 1146 in the arena