일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- data science
- Class
- Python Implementation
- Substring with Concatenation of All Words
- 프로그래머스
- t1
- 109. Convert Sorted List to Binary Search Tree
- 컴퓨터의 구조
- 운영체제
- 43. Multiply Strings
- shiba
- Generator
- 시바견
- Decorator
- Python
- Convert Sorted List to Binary Search Tree
- Python Code
- 315. Count of Smaller Numbers After Self
- 30. Substring with Concatenation of All Words
- Protocol
- concurrency
- iterator
- attribute
- LeetCode
- 715. Range Module
- 밴픽
- 파이썬
- Regular Expression
- DWG
- kaggle
Archives
- Today
- Total
목록H-index (1)
Scribbling
프로그래머스: H-Index
딱 봐도 정렬 후 Binary Search하면 된다. 매번 그렇듯 프로그래머스 지문은 극혐이다. from bisect import bisect_left def solution(citations): answer = 0 citations.sort() l, r = 0, citations[len(citations) - 1] while l = mid: answer = max(answer, mid) l = mid + 1 else: r = mid - 1 return answer
Computer Science/Coding Test
2021. 10. 18. 23:24