五月天青色头像情侣网名,国产亚洲av片在线观看18女人,黑人巨茎大战俄罗斯美女,扒下她的小内裤打屁股

歡迎光臨散文網(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ó)家法律
抚宁县| 浦县| 石林| 敖汉旗| 城步| 天门市| 龙海市| 景德镇市| 勃利县| 宣化县| 福贡县| 汝州市| 右玉县| 宝鸡市| 梅河口市| 宁南县| 漠河县| 宜都市| 克拉玛依市| 盐津县| 巨鹿县| 岱山县| 信宜市| 玛多县| 凌源市| 进贤县| 博罗县| 突泉县| 常州市| 手机| 平安县| 沙雅县| 河曲县| 四子王旗| 淮安市| 电白县| 慈利县| 信丰县| 炉霍县| 衡阳县| 鹰潭市|