Tap here to switch tabs
Problem
Submissions

Problem: Stepping Numbers

Try to solve the Stepping Numbers problem.

Statement

A stepping number is an integer where every pair of adjacent digits has an absolute difference of 11.

Given two integers low and high, return a sorted list of all stepping numbers in the range [[low, high]] inclusive.

Constraints:

  • 0≤0 \leq low ≤\leq high ≤2×109\leq 2 \times 10^9

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Stepping Numbers

Try to solve the Stepping Numbers problem.

Statement

A stepping number is an integer where every pair of adjacent digits has an absolute difference of 11.

Given two integers low and high, return a sorted list of all stepping numbers in the range [[low, high]] inclusive.

Constraints:

  • 0≤0 \leq low ≤\leq high ≤2×109\leq 2 \times 10^9