일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- 운영체제
- Substring with Concatenation of All Words
- kaggle
- 컴퓨터의 구조
- shiba
- 109. Convert Sorted List to Binary Search Tree
- Python
- LeetCode
- attribute
- 프로그래머스
- iterator
- Protocol
- 43. Multiply Strings
- 파이썬
- Python Code
- t1
- concurrency
- Convert Sorted List to Binary Search Tree
- 시바견
- Decorator
- 315. Count of Smaller Numbers After Self
- 715. Range Module
- 밴픽
- Regular Expression
- Generator
- 30. Substring with Concatenation of All Words
- Python Implementation
- data science
- DWG
- Class
Archives
- Today
- Total
목록Search a 2D Matrix II (1)
Scribbling
LeetCode: 240. Search a 2D Matrix II
Several different solutions class Solution: def searchMatrix(self, matrix: List[List[int]], target: int) -> bool: j = bisect_right(matrix[0], target) - 1 i = bisect_right([mat[0] for mat in matrix], target) - 1 while i >= 0 and j >= 0: if matrix[i][j] < target: return False for k in range(0, i+1): if matrix[k][j] == target: return True for k in range(0, j+1): if matrix[i][k] == target: return Tr..
Computer Science/Coding Test
2021. 12. 27. 14:41