일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- 30. Substring with Concatenation of All Words
- Convert Sorted List to Binary Search Tree
- Python Implementation
- Class
- 밴픽
- 109. Convert Sorted List to Binary Search Tree
- 파이썬
- Python Code
- 컴퓨터의 구조
- attribute
- Python
- 715. Range Module
- 315. Count of Smaller Numbers After Self
- 운영체제
- Protocol
- LeetCode
- 43. Multiply Strings
- concurrency
- t1
- kaggle
- Regular Expression
- DWG
- 시바견
- 프로그래머스
- Generator
- Decorator
- shiba
- Substring with Concatenation of All Words
- data science
- iterator
Archives
- Today
- Total
목록74. Search a 2D Matrix (1)
Scribbling
LeetCode: 74. Search a 2D Matrix
class Solution: def searchMatrix(self, matrix: List[List[int]], target: int) -> bool: if target matrix[-1][-1]: return False m, n = len(matrix), len(matrix[0]) row = 0 # row search l, r = 0, m - 1 while l target: r = mid - 1 else: row = max(row, mid) l = mid + 1 # column search l, r = 0, n - 1 while l
Computer Science/Coding Test
2021. 9. 28. 21:20