Skip to content

[sonjh1217] WEEK 04 solutions #1825

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 4 commits into from
Aug 16, 2025
Merged

[sonjh1217] WEEK 04 solutions #1825

merged 4 commits into from
Aug 16, 2025

Conversation

sonjh1217
Copy link
Contributor

@sonjh1217 sonjh1217 commented Aug 14, 2025

답안 제출 문제

작성자 체크 리스트

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

검토자 체크 리스트

Important

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

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

@github-actions github-actions bot added the swift label Aug 14, 2025
@sonjh1217 sonjh1217 changed the title merge two sorted lists [sonjh1217] WEEK 04 solutions Aug 14, 2025
@s0ooo0k s0ooo0k self-requested a review August 14, 2025 05:08
Copy link
Member

@s0ooo0k s0ooo0k left a comment

Choose a reason for hiding this comment

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

swift 언어 풀이도 접해볼 수 있어서 좋았습니다!
다양한 방향으로 고민해보신게 느껴지네요
고생하셨습니다 :)

var high = nums.count - 1

while low <= high {
let mid = (low + high) / 2
Copy link
Member

Choose a reason for hiding this comment

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

디스코드에 Tony님이 올려주신 mid 오버플로우 관련 글도 한 번 읽어보시면 좋을 듯 합니다!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

감사합니다! 덕분에 Swift overflow한도도 배우고, (64라서 2^(63) - 1 ≈ 9.22 × 10^18라고 합니다)
코드도 overflow 방지하는 스타일로 변경했습니다. 095850e

@sonjh1217 sonjh1217 merged commit 2fd52b4 into DaleStudy:main Aug 16, 2025
1 check passed
@github-project-automation github-project-automation bot moved this from Solving to Completed in 리트코드 스터디 5기 Aug 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