Notice
Recent Posts
Recent Comments
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- 프로그래머스 파이썬
- hackerrank
- 데이콘
- 맥북
- Kaggle
- PYTHON
- 금융문자분석경진대회
- ChatGPT
- SW Expert Academy
- Git
- Docker
- 편스토랑 우승상품
- AI 경진대회
- 파이썬
- leetcode
- gs25
- Real or Not? NLP with Disaster Tweets
- 캐치카페
- 코로나19
- dacon
- github
- Baekjoon
- programmers
- 백준
- 더현대서울 맛집
- ubuntu
- 프로그래머스
- 자연어처리
- 편스토랑
- 우분투
Archives
- Today
- Total
목록
반응형
2020/07/22 (1)
반응형
솜씨좋은장씨
[leetCode] 386. Lexicographical Numbers (Python)
Given an integer n, return 1 - n in lexicographical order. For example, given 13, return: [1,10,11,12,13,2,3,4,5,6,7,8,9]. Please optimize your algorithm to use less time and space. The input size may be as large as 5,000,000. Solution class Solution: def lexicalOrder(self, n: int) -> List[int]: my_nums = [str(i) for i in range(1, n+1)] my_nums = list(sorted(my_nums)) return my_nums SOMJANG/CODI..
Programming/코딩 1일 1문제
2020. 7. 22. 22:37
반응형