Skip to content

Commit 6f92970

Browse files
Time: 79 ms (46.65%) | Memory: 23 MB (60.17%) - LeetSync
1 parent e9ad3f0 commit 6f92970

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
class Solution:
2+
def lexicalOrder(self, n: int) -> List[int]:
3+
nums = list(range(1, n+1))
4+
nums.sort(key = lambda x : str(x))
5+
return nums

0 commit comments

Comments
 (0)