일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- Python Implementation
- 운영체제
- 43. Multiply Strings
- Decorator
- Protocol
- 30. Substring with Concatenation of All Words
- Python Code
- attribute
- Substring with Concatenation of All Words
- t1
- 프로그래머스
- Python
- Class
- kaggle
- 109. Convert Sorted List to Binary Search Tree
- DWG
- 밴픽
- 시바견
- iterator
- shiba
- 파이썬
- Regular Expression
- 315. Count of Smaller Numbers After Self
- Generator
- 715. Range Module
- Convert Sorted List to Binary Search Tree
- LeetCode
- data science
- concurrency
- 컴퓨터의 구조
Archives
- Today
- Total
목록218. The Skyline Problem (1)
Scribbling
LeetCode: 218. The Skyline Problem
아래 너튜버분께 매번 배우게 되는 것 같다. https://www.youtube.com/watch?v=GSBLe8cKu0s&t=3s 아래는 위의 영상에 나온 알고리즘의 파이썬 코드이다. from functools import cmp_to_key import heapq class Solution: def getSkyline(self, buildings: List[List[int]]) -> List[List[int]]: # [loc, height, isEnd] points = [] for l, r, h in buildings: points.append([l, h, 0]) points.append([r, h, 1]) def compare(p1, p2): if p1[0] != p2[0]: return p1[0]..
Computer Science/Coding Test
2021. 12. 22. 19:19