Skip to content

Commit 2b355d3

Browse files
committed
Merge branch 'lexicographical_numbers' of https://github.com/1227haran/Python into lexicographical_numbers
2 parents 17356b0 + d62b61f commit 2b355d3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

data_structures/stacks/lexicographical_numbers.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@ def lexical_order(max_number: int) -> str:
1919
num = stack.pop()
2020
if num > max_number:
2121
continue
22-
22+
2323
ans.append(str(num))
24-
if (num % 10) != 9:
24+
if (num % 10) != 9:
2525
stack.append(num + 1)
2626

2727
stack.append(num * 10)
2828

2929
return " ".join(ans)
3030

31+
3132
if __name__ == "__main__":
32-
3333
from doctest import testmod
3434

3535
testmod()

0 commit comments

Comments
 (0)