Skip to content

Conversation

@doh6077
Copy link
Contributor

@doh6077 doh6077 commented Dec 9, 2025

답안 제출 문제

작성자 체크 리스트

  • Projects의 오른쪽 버튼(▼)을 눌러 확장한 뒤, Week를 현재 주차로 설정해주세요.
  • 문제를 모두 푸시면 프로젝트에서 StatusIn Review로 설정해주세요.
  • 코드 검토자 1분 이상으로부터 승인을 받으셨다면 PR을 병합해주세요.

검토자 체크 리스트

Important

본인 답안 제출 뿐만 아니라 다른 분 PR 하나 이상을 반드시 검토를 해주셔야 합니다!

  • 바로 이전에 올라온 PR에 본인을 코드 리뷰어로 추가해주세요.
  • 본인이 검토해야하는 PR의 답안 코드에 피드백을 주세요.
  • 토요일 전까지 PR을 병합할 수 있도록 승인해주세요.

@doh6077 doh6077 moved this from Solving to In Review in 리트코드 스터디 6기 Dec 12, 2025
Comment on lines +1 to +24

# 208. Implement Trie (Prefix Tree)
class Trie:

def __init__(self):
self.list = []


def insert(self, word: str) -> None:
self.list.append(word)


def search(self, word: str) -> bool:
if word in self.list:
return True
else:
return False


def startsWith(self, prefix: str) -> bool:
for i, value in enumerate(self.list):
if value.startswith(prefix):
return True
return False
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이거 파일을 다른 폴더에 넣으신 것 같습니다!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

그리고, 통과는 되었지만, Trie 구조와는 거리가 먼 것으로 보여서, 시간이 되시면, 한 번 만들어 보시는 것도 좋을 것 같습니다!

start = i - len(w)
if start >= 0 and dp[start] and s[start:i] == w:
dp[i] = True
break
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

해당 문제를 LIS dp 문제와 유사하게 풀 수 있었군요. 좋은 경험이었습니다.

@DaleSeo DaleSeo merged commit 93bc2f3 into DaleStudy:main Dec 14, 2025
1 check passed
@github-project-automation github-project-automation bot moved this from In Review to Completed in 리트코드 스터디 6기 Dec 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Completed

Development

Successfully merging this pull request may close these issues.

3 participants