Numbers With Same Consecutive Differences

Given two integers n and k, return an array of all integers of length n where the absolute difference between every two consecutive digits is exactly k. Integers must not have leading zeros: for instance, 02 and 043 are invalid because they start with 0. You may return the answer in any order.

Examples
Input: [3,7]
Output: [181,292,707,818,929]
Hints

Numbers With Same Consecutive Differences

Given two integers `n` and `k`, return an array of all integers of length `n` where the absolute difference between every two consecutive digits is exactly `k`. Integers must not have leading zeros: for instance, `02` and `043` are invalid because they start with `0`. You may return the answer in any order.