---
title: "Discussion on \"386. Lexicographical Numbers\" | Hashnode"
description: "Discussion on \"386. Lexicographical Numbers\". Problem Link\nGiven an integer n, return all the numbers in the range [1, n] sorted in lexicographical order.\nExample:\n\nInput: n = 32\nOutput: [1,10,11,12,13,14,15,16,17,18,19,2,20,21,22,23,24,25,26,27,28,29,3,30,31,32,4,5,6,7,8,9]\n\nclass Solution:\n   ..."
url: "https://hashnode.com/posts/386-lexicographical-numbers/62a08cc23e84266b46094fb9"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [386\. Lexicographical Numbers](https://superbcoder.hashnode.dev/386-lexicographical-numbers?utm_source=hashnode&utm_medium=feed)

Problem Link Given an integer n, return all the numbers in the range \[1, n\] sorted in lexicographical order. Example: Input: n = 32 Output: \[1,10,11,12,13,14,15,16,17,18,19,2,20,21,22,23,24,25,26,27,28,29,3,30,31,32,4,5,6,7,8,9\] class Solution: ...

Jun 8, 2022 · 1 min read · superbcoder.hashnode.dev  
Read the article

-   [#leetcode](https://hashnode.com/tag/leetcode)
-   [#array](https://hashnode.com/tag/array)

## Written by

[Jim Chung](https://hashnode.com/@JimHYC)

@JimHYC

  
[View profile](https://hashnode.com/@JimHYC)

Leetcode

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
