国产精品天干天干,亚洲毛片在线,日韩gay小鲜肉啪啪18禁,女同Gay自慰喷水

歡迎光臨散文網(wǎng) 會(huì)員登陸 & 注冊(cè)

Leetcode386. Lexicographical Numbers

2023-01-19 12:53 作者:您是打尖兒還是住店呢  | 我要投稿

Given an integer?n, return all the numbers in the range?[1, n]?sorted in lexicographical order.

You must write an algorithm that runs in?O(n)?time and uses?O(1)?extra space.?

?

Example 1:

Input: n = 13Output: [1,10,11,12,13,2,3,4,5,6,7,8,9]

Example 2:

Input: n = 2Output: [1,2]

?

Constraints:

  • 1 <= n <= 5 * 104

沒想到能過,以為會(huì)超時(shí)的;空間反正是超了的;

Runtime18 ms

Beats

25.95%

Memory48.6 MB

Beats

54.73%

Click to check the distribution chart


Leetcode386. Lexicographical Numbers的評(píng)論 (共 條)

分享到微博請(qǐng)遵守國(guó)家法律
惠东县| 墨脱县| 兰考县| 连城县| 临邑县| 北川| 衡水市| 大田县| 太保市| 沾益县| 诸城市| 五常市| 德令哈市| 富源县| 华安县| 府谷县| 广饶县| 西藏| 钟祥市| 周宁县| 藁城市| 如东县| 平舆县| 若羌县| 舞钢市| 武川县| 高尔夫| 岐山县| 金湖县| 阿坝县| 兰西县| 南雄市| 阜宁县| 东方市| 东乡县| 旺苍县| 博罗县| 江口县| 高尔夫| 凤翔县| 青龙|