LeetCode 46. Permutations
Question
Given an array nums
of distinct integers, return all the possible permutations. You can return the answer in any order.
Given an array nums
of distinct integers, return all the possible permutations. You can return the answer in any order.
Given an array of non-negative integers arr
, you are initially positioned at start
index of the array. When you are at index i
, you can jump to i + arr[i]
or i - arr[i]
, check if you can reach to any index with value 0.
Notice that you can not jump outside of the array at any time.