From 1a009e41158e676f5007d29daa8bdbffe3724699 Mon Sep 17 00:00:00 2001 From: Sang-Kil Park Date: Tue, 6 Jul 2021 01:45:29 +0900 Subject: [PATCH 01/16] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index b372ebd..fcc137c 100644 --- a/README.md +++ b/README.md @@ -141,5 +141,6 @@ ## 리트코드 변경 사항 - 7번 문제는 테스트케이스가 삭제되어 실행 시간이 달라졌습니다. [#62](https://github.com/onlybooks/algorithm-interview/issues/62) - 33번 문제의 보다 효율적인 풀이는 [#91](https://github.com/onlybooks/algorithm-interview/issues/91)을 참고하세요. +- 41번 문제가 테스트케이스 변경으로 타임아웃으로 더 이상 풀이가 되지 않습니다. [#104](https://github.com/onlybooks/algorithm-interview/issues/104) - 47번 문제는 평가 함수의 변경으로 `TreeNode` 선언을 주석으로 처리하고 실행하세요. [#97](https://github.com/onlybooks/algorithm-interview/issues/97) - 75번 문제는 테스트케이스가 추가되어 더 이상 풀이가 되지 않습니다. 새로운 풀이는 [#67](https://github.com/onlybooks/algorithm-interview/issues/67)을 참고하세요. From c7e8aa2b2f279aed3ca3e7a8f987093551e1197f Mon Sep 17 00:00:00 2001 From: Sang-Kil Park Date: Tue, 6 Jul 2021 01:49:28 +0900 Subject: [PATCH 02/16] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index fcc137c..8b17ec0 100644 --- a/README.md +++ b/README.md @@ -140,7 +140,8 @@ ## 리트코드 변경 사항 - 7번 문제는 테스트케이스가 삭제되어 실행 시간이 달라졌습니다. [#62](https://github.com/onlybooks/algorithm-interview/issues/62) +- 25번 문제의 불필요한 코드를 좀 더 제거한 풀이는 [#105](https://github.com/onlybooks/algorithm-interview/issues/105)를 참고하세요. - 33번 문제의 보다 효율적인 풀이는 [#91](https://github.com/onlybooks/algorithm-interview/issues/91)을 참고하세요. -- 41번 문제가 테스트케이스 변경으로 타임아웃으로 더 이상 풀이가 되지 않습니다. [#104](https://github.com/onlybooks/algorithm-interview/issues/104) +- 41번 문제가 테스트케이스 변경으로 타임아웃이 발생하여 더 이상 풀이가 되지 않습니다. [#104](https://github.com/onlybooks/algorithm-interview/issues/104) - 47번 문제는 평가 함수의 변경으로 `TreeNode` 선언을 주석으로 처리하고 실행하세요. [#97](https://github.com/onlybooks/algorithm-interview/issues/97) - 75번 문제는 테스트케이스가 추가되어 더 이상 풀이가 되지 않습니다. 새로운 풀이는 [#67](https://github.com/onlybooks/algorithm-interview/issues/67)을 참고하세요. From 9b1db22834f08dcb009bf19520107eff4c4cff0e Mon Sep 17 00:00:00 2001 From: Sang-Kil Park Date: Tue, 6 Jul 2021 02:00:28 +0900 Subject: [PATCH 03/16] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 8b17ec0..fe7ac8f 100644 --- a/README.md +++ b/README.md @@ -142,6 +142,7 @@ - 7번 문제는 테스트케이스가 삭제되어 실행 시간이 달라졌습니다. [#62](https://github.com/onlybooks/algorithm-interview/issues/62) - 25번 문제의 불필요한 코드를 좀 더 제거한 풀이는 [#105](https://github.com/onlybooks/algorithm-interview/issues/105)를 참고하세요. - 33번 문제의 보다 효율적인 풀이는 [#91](https://github.com/onlybooks/algorithm-interview/issues/91)을 참고하세요. +- 35번 문제의 보다 효율적인 풀이는 [#111](https://github.com/onlybooks/algorithm-interview/issues/111)을 참고하세요. - 41번 문제가 테스트케이스 변경으로 타임아웃이 발생하여 더 이상 풀이가 되지 않습니다. [#104](https://github.com/onlybooks/algorithm-interview/issues/104) - 47번 문제는 평가 함수의 변경으로 `TreeNode` 선언을 주석으로 처리하고 실행하세요. [#97](https://github.com/onlybooks/algorithm-interview/issues/97) - 75번 문제는 테스트케이스가 추가되어 더 이상 풀이가 되지 않습니다. 새로운 풀이는 [#67](https://github.com/onlybooks/algorithm-interview/issues/67)을 참고하세요. From 65018fd425442d3595fe2df430e82d306a4860a2 Mon Sep 17 00:00:00 2001 From: Sang-Kil Park Date: Tue, 6 Jul 2021 02:03:02 +0900 Subject: [PATCH 04/16] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index fe7ac8f..9f36c3f 100644 --- a/README.md +++ b/README.md @@ -140,9 +140,10 @@ ## 리트코드 변경 사항 - 7번 문제는 테스트케이스가 삭제되어 실행 시간이 달라졌습니다. [#62](https://github.com/onlybooks/algorithm-interview/issues/62) -- 25번 문제의 불필요한 코드를 좀 더 제거한 풀이는 [#105](https://github.com/onlybooks/algorithm-interview/issues/105)를 참고하세요. +- 25번 문제의 보다 효율적인 풀이는 [#105](https://github.com/onlybooks/algorithm-interview/issues/105)를 참고하세요. - 33번 문제의 보다 효율적인 풀이는 [#91](https://github.com/onlybooks/algorithm-interview/issues/91)을 참고하세요. - 35번 문제의 보다 효율적인 풀이는 [#111](https://github.com/onlybooks/algorithm-interview/issues/111)을 참고하세요. +- 36번 문제의 보다 효율적인 풀이는 [#112](https://github.com/onlybooks/algorithm-interview/issues/112)를 참고하세요. - 41번 문제가 테스트케이스 변경으로 타임아웃이 발생하여 더 이상 풀이가 되지 않습니다. [#104](https://github.com/onlybooks/algorithm-interview/issues/104) - 47번 문제는 평가 함수의 변경으로 `TreeNode` 선언을 주석으로 처리하고 실행하세요. [#97](https://github.com/onlybooks/algorithm-interview/issues/97) - 75번 문제는 테스트케이스가 추가되어 더 이상 풀이가 되지 않습니다. 새로운 풀이는 [#67](https://github.com/onlybooks/algorithm-interview/issues/67)을 참고하세요. From 2def577513c0028057d17ecc83f179d0d3fefed5 Mon Sep 17 00:00:00 2001 From: Sang-Kil Park Date: Wed, 14 Jul 2021 08:42:24 +0900 Subject: [PATCH 05/16] . --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9f36c3f..47b670a 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ - [파이썬 알고리즘 인터뷰](#파이썬-알고리즘-인터뷰) - [문제 풀이](#문제-풀이) - [기타 코드](#기타-코드) - - [리트코드 변경 사항](#리트코드-변경-사항) + - [리트코드 변경 사항 및 보다 효율적인 풀이](#리트코드-변경-사항-및-보다-효율적인-풀이) @@ -25,6 +25,8 @@ ★ YouTube: https://www.youtube.com/watch?v=fNyGHpSWhTA +☆ 학교나 학원에서 강의를 진행하시는 교수님/강사님께 제공 가능한 이 책의 강의 교안 자료가 준비되어 있습니다. (1) 성함, 연락처 (2) 강의처 (3) 강의 교과목 (4) 간단한 강의계획 등을 정리하셔서 support@onlybook.co.kr 이메일로 보내주십시오. 내용 검토 후 제공해드리겠습니다. + ![마인드맵](https://user-images.githubusercontent.com/1250095/86745916-a62e9a00-c075-11ea-9aa5-8455e2527f87.png) ## 문제 풀이 @@ -138,7 +140,7 @@ - 21장 [분할 가능 배낭 문제](miscellaneous/21-fractional-knapsack.py) - 23장 [0-1 배낭 문제](miscellaneous/23-zero-one-knapsack.py) -## 리트코드 변경 사항 +## 리트코드 변경 사항 및 보다 효율적인 풀이 - 7번 문제는 테스트케이스가 삭제되어 실행 시간이 달라졌습니다. [#62](https://github.com/onlybooks/algorithm-interview/issues/62) - 25번 문제의 보다 효율적인 풀이는 [#105](https://github.com/onlybooks/algorithm-interview/issues/105)를 참고하세요. - 33번 문제의 보다 효율적인 풀이는 [#91](https://github.com/onlybooks/algorithm-interview/issues/91)을 참고하세요. From 86cc0468f767385d8a8d09fe5ebd4a4692d2cade Mon Sep 17 00:00:00 2001 From: Sang-Kil Park Date: Wed, 28 Jul 2021 16:16:18 +0900 Subject: [PATCH 06/16] Update 85-3.py --- 5-algorithms/ch23/85-3.py | 1 + 1 file changed, 1 insertion(+) diff --git a/5-algorithms/ch23/85-3.py b/5-algorithms/ch23/85-3.py index 84d1723..7611a3a 100644 --- a/5-algorithms/ch23/85-3.py +++ b/5-algorithms/ch23/85-3.py @@ -5,6 +5,7 @@ class Solution: dp = collections.defaultdict(int) def fib(self, N: int) -> int: + self.dp[0] = 1 self.dp[1] = 1 for i in range(2, N + 1): From f5eaa62a93025c2ac300c24d17dc5834f84d9d60 Mon Sep 17 00:00:00 2001 From: Sang-Kil Park Date: Wed, 28 Jul 2021 16:18:13 +0900 Subject: [PATCH 07/16] Update 85-3.py --- 5-algorithms/ch23/85-3.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/5-algorithms/ch23/85-3.py b/5-algorithms/ch23/85-3.py index 7611a3a..e56a162 100644 --- a/5-algorithms/ch23/85-3.py +++ b/5-algorithms/ch23/85-3.py @@ -5,7 +5,7 @@ class Solution: dp = collections.defaultdict(int) def fib(self, N: int) -> int: - self.dp[0] = 1 + self.dp[0] = 0 self.dp[1] = 1 for i in range(2, N + 1): From b95ea67ae05f95a0cc7ccdcb101a0be2c61cc090 Mon Sep 17 00:00:00 2001 From: pythaac <86088023+pythaac@users.noreply.github.com> Date: Sat, 7 Aug 2021 02:50:03 +0900 Subject: [PATCH 08/16] Update 60-1.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit return cur.next의 indentation 오류입니다. head의 while loop 안에서 1번 처리 후 종료됩니다. --- 5-algorithms/ch17/60-1.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/5-algorithms/ch17/60-1.py b/5-algorithms/ch17/60-1.py index 82bd1c2..58edff0 100644 --- a/5-algorithms/ch17/60-1.py +++ b/5-algorithms/ch17/60-1.py @@ -15,4 +15,4 @@ def insertionSortList(self, head: ListNode) -> ListNode: cur.next, head.next, head = head, cur.next, head.next cur = parent - return cur.next + return cur.next From bbc4677f4ce0f570e1edb1c43ba151cf6368b83e Mon Sep 17 00:00:00 2001 From: Yanghyeondong <37038105+Yanghyeondong@users.noreply.github.com> Date: Wed, 23 Nov 2022 16:46:57 +0900 Subject: [PATCH 09/16] Fix 26-1.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [이슈 링크](https://github.com/onlybooks/algorithm-interview/issues/160) 간단하게 `ListNode` 주석 및 변수만 고쳐봤습니다. 리트코드 통과도 확인했습니다. 좋은 책 감사합니다! --- 3-linear-data-structures/ch10/26-1.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/3-linear-data-structures/ch10/26-1.py b/3-linear-data-structures/ch10/26-1.py index 209cf71..9896d9c 100644 --- a/3-linear-data-structures/ch10/26-1.py +++ b/3-linear-data-structures/ch10/26-1.py @@ -1,9 +1,9 @@ -# Definition for singly-linked list. +# Definition for doubly-linked-list. class ListNode: def __init__(self, x): self.val = x - self.next = None - + self.right = None + self.left = None class MyCircularDeque: def __init__(self, k: int): From b1452b031b187251f487e4e83f5b3c245a1d9891 Mon Sep 17 00:00:00 2001 From: Jongbin Won <114343209+Jongbin-kr@users.noreply.github.com> Date: Tue, 15 Aug 2023 21:32:50 +0900 Subject: [PATCH 10/16] Edit README.md 10_array_partition hyperlink MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 10번 문제 [배열 파티션 I]의 leetcode 링크가 변경되어 수정합니다. 기존 링크: https://leetcode.com/problems/array-partition-i/ 수정 링크: https://leetcode.com/problems/array-partition) 그래서 초록옷 입은 애가 젤다죠? --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 47b670a..1c4153b 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ | 7 | [두 수의 합](https://leetcode.com/problems/two-sum/) | ★ | 7장. 배열 | [7-1.py](3-linear-data-structures/ch07/7-1.py)
[7-2.py](3-linear-data-structures/ch07/7-2.py)
[7-3.py](3-linear-data-structures/ch07/7-3.py)
[7-4.py](3-linear-data-structures/ch07/7-4.py)
[7-5.py](3-linear-data-structures/ch07/7-5.py)
[7-6.go](3-linear-data-structures/ch07/7-6.go) | | 8 | [빗물 트래핑](https://leetcode.com/problems/trapping-rain-water/) | ★★★ | 7장. 배열 | [8-1.py](3-linear-data-structures/ch07/8-1.py)
[8-2.py](3-linear-data-structures/ch07/8-2.py) | | 9 | [세 수의 합](https://leetcode.com/problems/3sum/) | ★★ | 7장. 배열 | [9-1.py](3-linear-data-structures/ch07/9-1.py)
[9-2.py](3-linear-data-structures/ch07/9-2.py) | -| 10 | [배열 파티션 I](https://leetcode.com/problems/array-partition-i/) | ★ | 7장. 배열 | [10-1.py](3-linear-data-structures/ch07/10-1.py)
[10-2.py](3-linear-data-structures/ch07/10-2.py)
[10-3.py](3-linear-data-structures/ch07/10-3.py) | +| 10 | [배열 파티션 I](https://leetcode.com/problems/array-partition/) | ★ | 7장. 배열 | [10-1.py](3-linear-data-structures/ch07/10-1.py)
[10-2.py](3-linear-data-structures/ch07/10-2.py)
[10-3.py](3-linear-data-structures/ch07/10-3.py) | | 11 | [자신을 제외한 배열의 곱](https://leetcode.com/problems/product-of-array-except-self/) | ★★ | 7장. 배열 | [11-1.py](3-linear-data-structures/ch07/11-1.py) | | 12 | [주식을 사고팔기 가장 좋은 시점](https://leetcode.com/problems/best-time-to-buy-and-sell-stock/) | ★ | 7장. 배열 | [12-1.py](3-linear-data-structures/ch07/12-1.py)
[12-2.py](3-linear-data-structures/ch07/12-2.py) | | 13 | [팰린드롬 연결 리스트](https://leetcode.com/problems/palindrome-linked-list/) | ★ | 8장. 연결 리스트 | [13-1.py](3-linear-data-structures/ch08/13-1.py)
[13-2.py](3-linear-data-structures/ch08/13-2.py)
[13-3.go](3-linear-data-structures/ch08/13-3.go)
[13-4.py](3-linear-data-structures/ch08/13-4.py) | From 80d5faa6638f19c489fe0374c424437c7b2d17d2 Mon Sep 17 00:00:00 2001 From: Sang-Kil Park Date: Fri, 22 Sep 2023 18:58:20 +0900 Subject: [PATCH 11/16] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 1c4153b..f488283 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,8 @@ ☆ 학교나 학원에서 강의를 진행하시는 교수님/강사님께 제공 가능한 이 책의 강의 교안 자료가 준비되어 있습니다. (1) 성함, 연락처 (2) 강의처 (3) 강의 교과목 (4) 간단한 강의계획 등을 정리하셔서 support@onlybook.co.kr 이메일로 보내주십시오. 내용 검토 후 제공해드리겠습니다. +★ 참고 GitHub: 《자바 알고리즘 인터뷰 with 코틀린》 https://github.com/onlybooks/java-algorithm-interview + ![마인드맵](https://user-images.githubusercontent.com/1250095/86745916-a62e9a00-c075-11ea-9aa5-8455e2527f87.png) ## 문제 풀이 From 1229eb73017d8a1804b2e8984d925ad99b757acb Mon Sep 17 00:00:00 2001 From: Sang-Kil Park Date: Fri, 22 Sep 2023 18:59:10 +0900 Subject: [PATCH 12/16] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f488283..46a2fae 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ ☆ 학교나 학원에서 강의를 진행하시는 교수님/강사님께 제공 가능한 이 책의 강의 교안 자료가 준비되어 있습니다. (1) 성함, 연락처 (2) 강의처 (3) 강의 교과목 (4) 간단한 강의계획 등을 정리하셔서 support@onlybook.co.kr 이메일로 보내주십시오. 내용 검토 후 제공해드리겠습니다. -★ 참고 GitHub: 《자바 알고리즘 인터뷰 with 코틀린》 https://github.com/onlybooks/java-algorithm-interview +★ 참고: 《자바 알고리즘 인터뷰 with 코틀린》 https://github.com/onlybooks/java-algorithm-interview ![마인드맵](https://user-images.githubusercontent.com/1250095/86745916-a62e9a00-c075-11ea-9aa5-8455e2527f87.png) From eee1429532c1930749474df8b6b2709b3ead3bbf Mon Sep 17 00:00:00 2001 From: Sang-Kil Park Date: Fri, 22 Sep 2023 19:02:39 +0900 Subject: [PATCH 13/16] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 46a2fae..1f625ed 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,8 @@ 95가지 알고리즘 문제 풀이로 완성하는 코딩 테스트 +★ 안내: 2023년 9월, [《자바 알고리즘 인터뷰 with 코틀린》](https://www.onlybook.co.kr/entry/java-algorithm-interview) 신간이 출간되었습니다! + ![책표지](http://docs.likejazz.com/images/2020/book-cover.jpg) 《파이썬 알고리즘 인터뷰》는 다음 판매처에서 구매하실 수 있습니다. - [교보문고](https://bit.ly/3feaYxi) From 572d6f8c41bddabd8a745fd9d6be2967c8379300 Mon Sep 17 00:00:00 2001 From: Sang-Kil Park Date: Fri, 22 Sep 2023 19:03:05 +0900 Subject: [PATCH 14/16] Update README.md --- README.md | 9 --------- 1 file changed, 9 deletions(-) diff --git a/README.md b/README.md index 1f625ed..8556ef8 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,3 @@ - - -- [파이썬 알고리즘 인터뷰](#파이썬-알고리즘-인터뷰) - - [문제 풀이](#문제-풀이) - - [기타 코드](#기타-코드) - - [리트코드 변경 사항 및 보다 효율적인 풀이](#리트코드-변경-사항-및-보다-효율적인-풀이) - - - # 파이썬 알고리즘 인터뷰 95가지 알고리즘 문제 풀이로 완성하는 코딩 테스트 From 5e4ed1c8a99be789ffebfdc3711d1de758186e6e Mon Sep 17 00:00:00 2001 From: Sang-Kil Park Date: Fri, 22 Sep 2023 19:05:31 +0900 Subject: [PATCH 15/16] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8556ef8..b76adbe 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,8 @@ ★ 안내: 2023년 9월, [《자바 알고리즘 인터뷰 with 코틀린》](https://www.onlybook.co.kr/entry/java-algorithm-interview) 신간이 출간되었습니다! -![책표지](http://docs.likejazz.com/images/2020/book-cover.jpg) + + 《파이썬 알고리즘 인터뷰》는 다음 판매처에서 구매하실 수 있습니다. - [교보문고](https://bit.ly/3feaYxi) - [YES24](https://bit.ly/3iGw8Gw) From e9a0aac8b51885f2da84df3a349c962041be4d83 Mon Sep 17 00:00:00 2001 From: Sang-Kil Park Date: Fri, 22 Sep 2023 19:15:27 +0900 Subject: [PATCH 16/16] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b76adbe..f0a4055 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ 95가지 알고리즘 문제 풀이로 완성하는 코딩 테스트 -★ 안내: 2023년 9월, [《자바 알고리즘 인터뷰 with 코틀린》](https://www.onlybook.co.kr/entry/java-algorithm-interview) 신간이 출간되었습니다! +★ 안내: 2023년 9월, [《자바 알고리즘 인터뷰 with 코틀린》](https://github.com/onlybooks/java-algorithm-interview) 신간이 출간되었습니다!