Sequential Digits

Medium · Math & Number Theory · about 10 minutes

Asked at Bloomberg, Amazon, Google, Meta.

An integer has sequential digits if each digit is one more than the previous one (like 123 or 4567). Return a sorted list of all such integers in the inclusive range [low, high].