Skip to content

[DaleSeo] WEEK 05 Solutions#2490

Merged
DaleSeo merged 1 commit intomainfrom
week5
Mar 31, 2026
Merged

[DaleSeo] WEEK 05 Solutions#2490
DaleSeo merged 1 commit intomainfrom
week5

Conversation

@DaleSeo
Copy link
Copy Markdown
Member

@DaleSeo DaleSeo commented Mar 29, 2026

답안 제출 문제

작성자 체크 리스트

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

검토자 체크 리스트

Important

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

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

tedkimdev
tedkimdev previously approved these changes Mar 30, 2026
Copy link
Copy Markdown
Contributor

@tedkimdev tedkimdev left a comment

Choose a reason for hiding this comment

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

깔끔하네요. 수고하셨습니다.

@tedkimdev tedkimdev dismissed their stale review March 30, 2026 21:21

Approving was a mistake; I miss-clicked.

Copy link
Copy Markdown
Contributor

@Cyjin-jani Cyjin-jani left a comment

Choose a reason for hiding this comment

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

5주차도 고생 많으셨습니다!

rust 코드는 처음 봐서 AI와 리뷰를 해보았는데, rust에 흥미가 조금 생겼습니다 😄

for b in s.bytes() {
count[(b - b'a') as usize] += 1;
}
anagrams.entry(count).or_default().push(s);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

rust를 아예 몰라서, AI의 도움을 받아서 리뷰를 해보았습니다만.. 위 코드는 js에서 두줄로 써야 하는 코드군요..!

// js라면...
if (!map.has(key)) map.set(key, []);
map.get(key).push(str);

한줄로 깔끔하게 작성되는 걸 보니 rust에 흥미가 생겼습니다..ㅎㅎ

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

하하, 이 참에 Rust 함께 배우시죠? ㅋㅋ

pub fn group_anagrams(strs: Vec<String>) -> Vec<Vec<String>> {
let mut anagrams: HashMap<[u8; 26], Vec<String>> = HashMap::new();
for s in strs {
let mut count = [0u8; 26];
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

문자 빈도수 배열로 카운팅을 하신 풀이가 좋았습니다..! 좋은 아이디어 배워갑니다.

@DaleSeo DaleSeo merged commit 8a4a45d into main Mar 31, 2026
3 checks passed
@DaleSeo DaleSeo deleted the week5 branch March 31, 2026 10:54
@github-project-automation github-project-automation bot moved this from Solving to Completed in 리트코드 스터디 7기 Mar 31, 2026
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