From ccc41907ac7eb66b13efa1a82768bea561a4bcbd Mon Sep 17 00:00:00 2001
From: Ko Jun Su <53261335+rkaclfdl123@users.noreply.github.com>
Date: Mon, 21 Feb 2022 22:00:22 +0900
Subject: [PATCH] =?UTF-8?q?Update=20=EC=BD=94=EB=94=A9=ED=85=8C=EC=8A=A4?=
=?UTF-8?q?=ED=8A=B8=EB=A5=BC=20=EC=9C=84=ED=95=9C=20Tip.md?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
update [bisect Library]
---
...3\245\274 \354\234\204\355\225\234 Tip.md" | 23 ++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git "a/Tip for CodingTest/\354\275\224\353\224\251\355\205\214\354\212\244\355\212\270\353\245\274 \354\234\204\355\225\234 Tip.md" "b/Tip for CodingTest/\354\275\224\353\224\251\355\205\214\354\212\244\355\212\270\353\245\274 \354\234\204\355\225\234 Tip.md"
index 78f8c91..6063a65 100644
--- "a/Tip for CodingTest/\354\275\224\353\224\251\355\205\214\354\212\244\355\212\270\353\245\274 \354\234\204\355\225\234 Tip.md"
+++ "b/Tip for CodingTest/\354\275\224\353\224\251\355\205\214\354\212\244\355\212\270\353\245\274 \354\234\204\355\225\234 Tip.md"
@@ -1,5 +1,10 @@
# 코딩테스트를 위한 팁
+## 코딩테스트에 쓰이는 라이브러리나 알게 된 것 들을 추가하는 공간입니다.
+
+
+
+
### remove 와 discard의 차이점
- Remove()는 지워야 할 원소가 없으면 error 발생
@@ -23,4 +28,20 @@ number.discard(7) #없는 7을 제거할 때
```python
list_number=[1,2,3,4,5,6]
list_number.discard(x) #오류남, discard는 리스트에서 사용 불가
-```
\ No newline at end of file
+```
+
+
+
+
+
+### 이진탐색에는 from bisect import bisect_right, bisect_left
+```python
+from bisect import bisect_right, bisect_left
+
+bisect_left(a, x)
+#정렬된 a에 x를 삽입할 위치를 리턴해준다. x가 a에 이미 있으면 기존 항목의 앞 (왼쪽)의 위치를 반환한다.
+
+bisect_right(a, x)
+#bisect_left와 거의 같은 함수인데, 이번에는 x가 a에 이미 있으면 기존 항목 뒤 (오른쪽)의 위치를 반환한다.
+```
+