1215. Stepping Numbers
https://leetcode.com/problems/stepping-numbers
Description
A stepping number is an integer such that all of its adjacent digits have an absolute difference of exactly 1
.
For example,
321
is a stepping number while421
is not.
Given two integers low
and high
, return a sorted list of all the stepping numbers in the inclusive range [low, high]
.
Example 1:
Example 2:
Constraints:
0 <= low <= high <= 2 * 109
ac
Last updated