mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-01-10 18:48:13 +08:00
19 lines
738 B
HTML
19 lines
738 B
HTML
<p>An integer has <em>sequential digits</em> if and only if each digit in the number is one more than the previous digit.</p>
|
|
|
|
<p>Return a <strong>sorted</strong> list of all the integers in the range <code>[low, high]</code> inclusive that have sequential digits.</p>
|
|
|
|
<p> </p>
|
|
<p><strong class="example">Example 1:</strong></p>
|
|
<pre><strong>Input:</strong> low = 100, high = 300
|
|
<strong>Output:</strong> [123,234]
|
|
</pre><p><strong class="example">Example 2:</strong></p>
|
|
<pre><strong>Input:</strong> low = 1000, high = 13000
|
|
<strong>Output:</strong> [1234,2345,3456,4567,5678,6789,12345]
|
|
</pre>
|
|
<p> </p>
|
|
<p><strong>Constraints:</strong></p>
|
|
|
|
<ul>
|
|
<li><code>10 <= low <= high <= 10^9</code></li>
|
|
</ul>
|