Conversation
doitchuu
previously approved these changes
Mar 5, 2026
Member
doitchuu
left a comment
There was a problem hiding this comment.
고생하셨습니다 👍 저희 스터디 초반에 푼거 보면 저희도 많이 성장한 거 같아요!!!
항상 열심히시군요 💯 파이팅입니닫
| 재귀 알고리즘을 이용해서 문제를 풀려고 했다. | ||
| 재귀 알고리즘은 풀이가 간단하지만 시간 복잡도가 O(2^n)으로 매우 비효율적이다. | ||
| 다른 사람들의 풀이를 보니 DP로 푼 것이 시간 복잡도 측면에서 더 효율적으로 나왔다. | ||
| */ |
Member
There was a problem hiding this comment.
이런 식으로 재귀 알고리즘을 유지하되 메모이제이션을 활용하는 방법도 있는 것 같아요.
이 풀이도 신박해서 가져와봤습니다..!
Suggested change
| */ | |
| var climbStairs = function(n) { | |
| const memo = new Array(n + 1).fill(0); | |
| function dfs(k) { | |
| if (k <= 2) return k; | |
| if (memo[k]) return memo[k]; | |
| memo[k] = dfs(k - 1) + dfs(k - 2); | |
| return memo[k]; | |
| } | |
| return dfs(n); | |
| }; |
raejun/LongestPalindrome.js
Outdated
| let isOdd = true; | ||
|
|
||
| for (const [_, v] of map) { | ||
| console.log(_, v); |
Member
There was a problem hiding this comment.
요런 console 도 지워주면 더 좋을 것 같습니다 👍
| let sum = 0; | ||
| let isOdd = true; | ||
|
|
||
| for (const [_, v] of map) { |
Member
There was a problem hiding this comment.
값만 필요하니, 이렇게 풀어줘도 깔끔할 것 같아요!
Suggested change
| for (const [_, v] of map) { | |
| for (const v of map.values()) { | |
| // v는 count | |
| } |
sik9252
approved these changes
Mar 5, 2026
Collaborator
sik9252
left a comment
There was a problem hiding this comment.
하고싶은 얘기들 이미 슬기님이 다 해주신듯하여..!! 요새 다들 문제도 빨리 풀고, 코멘트도 엄청 빨리빨리 남기시고 열정이 대단한거같아 좋네요 ㅎㅎ
doitchuu
approved these changes
Mar 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
이렇게 풀었어요
1. Climbing Stairs
1) 복잡도 계산
2) 접근 아이디어
3) 회고
2. Longest Palindrome
1) 복잡도 계산
2) 접근 아이디어
3) 회고