Skip to content

[liza0525] WEEK 01 Solutions - #2919

Open
liza0525 wants to merge 4 commits into
DaleStudy:mainfrom
liza0525:week-01
Open

liza0525 wants to merge 4 commits into
DaleStudy:mainfrom
liza0525:week-01

Conversation

@liza0525

@liza0525 liza0525 commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

답안 제출 문제

작성자 체크 리스트

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

검토자 체크 리스트

Important

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

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

@liza0525 liza0525 self-assigned this Nov 12, 2026
@github-actions github-actions Bot added the c++ label Nov 12, 2026
@dalestudy

dalestudy Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

🤖 AI 리뷰(알고리즘 패턴, 시간/공간 복잡도, 학습 현황) 결과는 Checks 탭에서 볼 수 있어요.

@liza0525 liza0525 changed the title Week 01 [liza0525] WEEK 01 Solutions Nov 12, 2026

@DaleSeo DaleSeo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

수고하셨습니다!

Comment thread contains-duplicate/liza0525.cpp Outdated

// 풀이 2 - sort한 후 근접 요소 비교
// TC: O(n log n) - sorting 비용 n log n > for문 비용 n
// SC: O(1) - 새로 쓰는 변수 없음

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

std::sort는 introsort라서 재귀 스택에 O(log n) 공간을 쓰지 않나요?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

헉 맞습니다 재귀 스택을 생각 못했네요 ㅠㅠ

이와 같이 주석 수정했습니다!
다만 introsort 방식을 처음 알게 돼서 같이 적어보았어요
(cpp는 처음인데, python sort와도 다르다는 점도 이번에 깨달았습니다😀)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

image

다만 제안 하나 드려봅니다! TC/SC 채점 액션을 제공해주셔서 잘 활용하고 있었는데요,
이전 채점에서는 SC: O(1)이 맞는 것으로 채점이 되어서 (사진 참고)
혹시 재귀 스택을 계산하는 경우도 같이 채점 기준에 고려해주시면 어떠실까요?
(+) 지금은 다시 채점되면서 해당 표가 사라진 듯합니다 ㅠㅠ

@DaleSeo DaleSeo Nov 13, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

그렇군요. AI 리뷰 관련 제안은 https://github.com/DaleStudy/github 저장소에 이슈나 PR로 올려주시면 됩니다.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

관리하시는 레포가 있었군요! 이슈열어보았습니다. 말씀 감사합니다!

Comment thread two-sum/liza0525.cpp Resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

2 participants