Skip to content

[Tessa1217] Week 07 Solutions #1463

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 6 commits into from
May 16, 2025
Merged

[Tessa1217] Week 07 Solutions #1463

merged 6 commits into from
May 16, 2025

Conversation

Tessa1217
Copy link
Contributor

@Tessa1217 Tessa1217 commented May 12, 2025

답안 제출 문제

작성자 체크 리스트

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

검토자 체크 리스트

Important

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

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

@github-actions github-actions bot added the java label May 12, 2025
@Tessa1217 Tessa1217 changed the title [Tessa1217] Week07 Solutions [Tessa1217] Week 07 Solutions May 12, 2025
@Jeehay28 Jeehay28 self-requested a review May 12, 2025 11:55
@Tessa1217 Tessa1217 moved this from Solving to In Review in 리트코드 스터디 4기 May 12, 2025
int right = 0;

// 알파벳 (대소문자), 숫자, 특수문자, 공백
boolean[] visited = new boolean[128];
Copy link
Contributor

Choose a reason for hiding this comment

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

visited를 고정된 크기의 boolean 배열로 처리해서, 공간을 항상 O(1)로 유지하는 점이 특히 인상 깊었습니다.
문자열 길이에 상관없이 일정한 성능을 유지할 수 있어서 좋은 접근인 것 같아요!


ListNode prev = head;
ListNode next = prev.next;
head.next = null;
Copy link
Contributor

Choose a reason for hiding this comment

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

head.next = null 부분이 처음엔 낯설고 직관적으로 와닿지 않아서 한참을 살펴보았습니다. 하지만, 흐름을 따라가며 이해하니 로직이 깔끔하게 구성된 점이 인상 깊었습니다.

// land라면
if (grid[i][j] == '1') {

// bfs로 섬 탐색
Copy link
Contributor

Choose a reason for hiding this comment

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

dfs 또는 bfs 하나만 선택해서 사용하는 것으로 주석 처리하면 어떨까합니다.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

앗 bfs랑 dfs 성능 비교해본다고 올렸다가 ㅎㅎ 주석을 다 풀고 올렸네요. 감사합니다!

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