| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
Tags
- 정렬
- Algorithm
- 코테
- 알고리즘
- isalpha()
- 우선순위 큐
- 추천시스템
- 동적 프로그래밍
- isalnum()
- explainable recommendation
- 자료구조
- find()
- kg
- isnumeric()
- Deque
- isdigit()
- knowledge
- Knowledge graph
- Stack
- Python
- 파이썬
- LSTM
- Dynamic Programming
- 그래프 탐색
- 그래프
- bfs
- 프로그래머스
- 백준
- DP
- Recommendation
Archives
- Today
- Total
목록lower bound (1)
데린이 고인물되기
[TIL] 250531 - 이분탐색(Lower Bound / Upper Bound / Custom Bound)
🧩 1. Lower Bound 이분탐색에서 원하는 값(target) 이상이 처음 등장하는 위치를 찾는 것예시arr = [13, 35, 40, 56, 56, 56, 59, 60, 62, 84]위와 같은 배열이 정렬되어 있다고 할 때, target = 56 일 때, 처음으로 56이 나오는 위치는 index 3 → Lower Bound(56) = 3이걸 찾는게 이진 탐색에서 lower bound Lower Bound 코드def lower_bound(arr, target): left = 0 right = len(arr) - 1 min_idx = len(arr) # 최대 index + 1로 초기화 while left = target: min_idx = mid ..
Algorithm/정리
2025. 5. 31. 20:15