Given two integers n and k, return an array of all integers of length n such that the absolute difference between every two consecutive digits is equal to k.
You may return the answer in any order.
Note: Every integer in the answer must have exactly
ndigits and cannot contain leading zeros.
Constraints:
n
k
Given two integers n and k, return an array of all integers of length n such that the absolute difference between every two consecutive digits is equal to k.
You may return the answer in any order.
Note: Every integer in the answer must have exactly
ndigits and cannot contain leading zeros.
Constraints:
n
k