일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- shiba
- kaggle
- 315. Count of Smaller Numbers After Self
- 프로그래머스
- Regular Expression
- DWG
- concurrency
- 밴픽
- attribute
- 30. Substring with Concatenation of All Words
- 시바견
- Python
- 109. Convert Sorted List to Binary Search Tree
- 파이썬
- data science
- 715. Range Module
- 컴퓨터의 구조
- Decorator
- Convert Sorted List to Binary Search Tree
- Class
- iterator
- Protocol
- 43. Multiply Strings
- t1
- Generator
- Substring with Concatenation of All Words
- LeetCode
- Python Code
Archives
- Today
- Total
목록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