
Question Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order. Solution class Solution: def searchInsert(self, nums: List[int], target: int) -> int: return 1일1깡 방법 if target in nums: return nums.index(target) else: nums.append(target) nums.sort() return nums.index(target) Binary Search low = 0 hi..
Development/Algorithms
2020. 6. 8. 01:18
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- go
- kubens
- Git
- 나는리뷰어다
- 키보드
- Container
- csv
- Gemma
- Python
- LLM
- 파이썬
- BASIC
- feed-forward
- 책리뷰
- lllm
- Shell
- Kubernetes
- palindrome
- Fine-Tuning
- collator
- AWS
- K8S
- leetcode
- Algorithm
- 한빛미디어
- docker
- error
- book
- kubernetes context
- Binary
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함
반응형