일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- 시바견
- Decorator
- 컴퓨터의 구조
- Python Code
- 43. Multiply Strings
- 315. Count of Smaller Numbers After Self
- Class
- 운영체제
- 109. Convert Sorted List to Binary Search Tree
- 밴픽
- shiba
- 30. Substring with Concatenation of All Words
- Protocol
- 파이썬
- iterator
- Substring with Concatenation of All Words
- Regular Expression
- DWG
- Python
- 715. Range Module
- Generator
- 프로그래머스
- t1
- attribute
- data science
- Convert Sorted List to Binary Search Tree
- Python Implementation
- concurrency
- kaggle
- LeetCode
Archives
- Today
- Total
목록Median of Two Sorted Arrays (1)
Scribbling
LeetCode: 4. Median of Two Sorted Arrays
개인적으론 정말 정말 어렵다... 아래 선생님께서 매우 친절하게 잘 알려주신다... https://www.youtube.com/watch?v=LPFhl65R7ww&t=641s 핵심을 정리하면 아래와 같다. - nums1과 nums2 중 길이가 작은 리스트에 대해 binary search를 한다. - nums1과 nums2를 partition 하되, nums1의 left partition과 nums2의 left partition은 전체 길이의 절반 혹은 절반 + 1이 되도록 partition한다. 즉, nums1의 partition p1이 결정되면, p2도 자동으로 결정된다. p2 = (m + n + 1) // 2 - p1 - p1이 0 혹은 m이 되는 경우의 corner case를 처리한다. p1이 0이..
Computer Science/Coding Test
2021. 12. 12. 13:55