0967. Numbers With Same Consecutive Differences
https://leetcode.com/problems/numbers-with-same-consecutive-differences
Description
Return all non-negative integers of length n
such that the absolute difference between every two consecutive digits is k
.
Note that every number in the answer must not have leading zeros. For example, 01
has one leading zero and is invalid.
You may return the answer in any order.
Example 1:
Example 2:
Example 3:
Example 4:
Constraints:
2 <= n <= 9
0 <= k <= 9
ac
Last updated