Tap here to switch tabs
Problem
Submissions

Problem: Sequential Digits

Sequential Digits asks you to return every number in an inclusive range whose digits increase by exactly one from left to right, in sorted order.

Statement

An integer is defined to have sequential digits if each digit in the number is exactly 11 greater than the digit preceding it.

Given two integers low and high, return a sorted list of all integers in the inclusive range [[low, high]] that have sequential digits.

Constraints:

  • 10≤10 \leq low ≤\leq high ≤109\leq 10^9

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Sequential Digits

Sequential Digits asks you to return every number in an inclusive range whose digits increase by exactly one from left to right, in sorted order.

Statement

An integer is defined to have sequential digits if each digit in the number is exactly 11 greater than the digit preceding it.

Given two integers low and high, return a sorted list of all integers in the inclusive range [[low, high]] that have sequential digits.

Constraints:

  • 10≤10 \leq low ≤\leq high ≤109\leq 10^9