Skip to content

[sejineer] Week 05 solutions #1398

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 3, 2025
Merged

[sejineer] Week 05 solutions #1398

merged 5 commits into from
May 3, 2025

Conversation

sejineer
Copy link
Contributor

@sejineer sejineer commented Apr 30, 2025

답안 제출 문제

작성자 체크 리스트

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

검토자 체크 리스트

Important

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

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

@sejineer sejineer moved this from Solving to In Review in 리트코드 스터디 4기 May 2, 2025
buy = min(buy, price)
result = max(profit, result)

return result
Copy link
Contributor

Choose a reason for hiding this comment

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

저는 max, min 메서드를 사용을 하지는 않고 풀었는데 이렇게 푸니 코드가 더 깔끔해보이네요!

s_counter = Counter(s)
strs_dict[frozenset(s_counter.items())].append(s)

return list(strs_dict.values())
Copy link
Contributor

Choose a reason for hiding this comment

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

역시 파이썬은 제공해주는 메서드가 많아서 자바에 비해 코드가 간단한 것이 좋은 것 같습니다

return True
return False

return dfs(0)
Copy link
Contributor

Choose a reason for hiding this comment

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

저는 재귀로 풀었었는데 dfs로도 풀 수 있네요!
다른 해설을 보았을 때 DP로도 가능하다고 해서, DP 방식도 도전해 보셨으면 좋겠습니다.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

DP 풀이도 한 번 도전해 보겠습니다!

@sora0319
Copy link
Contributor

sora0319 commented May 3, 2025

1주간 수고하셨습니다!

@sejineer
Copy link
Contributor Author

sejineer commented May 3, 2025

1주간 수고하셨습니다!

리뷰 감사합니다. 다음 주도 화이팅입니다 ㅎㅎ

@sejineer sejineer merged commit c65a77f into DaleStudy:main May 3, 2025
1 check passed
@github-project-automation github-project-automation bot moved this from In Review to Completed in 리트코드 스터디 4기 May 3, 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.

2 participants