Skip to content

Conversation

sungjinwi
Copy link
Contributor

@sungjinwi sungjinwi commented Dec 9, 2024

답안 제출 문제

체크 리스트

  • PR을 프로젝트에 추가하고 Week를 현재 주차로 설정해주세요.
  • 바로 앞에 PR을 열어주신 분을 코드 검토자로 지정해주세요.
  • 문제를 모두 푸시면 프로젝트에서 Status를 In Review로 설정해주세요.
  • 코드 검토자 1분 이상으로부터 승인을 받으셨다면 PR을 병합해주세요.

@sungjinwi sungjinwi requested a review from a team as a code owner December 9, 2024 15:37
@github-actions github-actions bot added the c label Dec 9, 2024
@sungjinwi sungjinwi assigned sungjinwi and unassigned sungjinwi Dec 9, 2024
Copy link
Contributor

@HC-kang HC-kang left a comment

Choose a reason for hiding this comment

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

@sungjinwi 님 첫주차 고생 많으셨습니다!
복잡도 분석까지 작성해주셔서 정말 좋네요~

좀 더 리뷰를 빨리 드렸다면 제출해주신 코드들을 좀 더 최적화 해 볼 수 있었을텐데 이 부분이 조금 아쉬울 뿐입니다 😿
다음 주차에도 좋은 풀이 부탁드릴게요!


추가적으로 할당하는 메모리가 없으므로 O(1)의 복잡도를 가진다

최종 공간 복잡도 : O(1)
Copy link
Contributor

Choose a reason for hiding this comment

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

정확히는 모르지만, 혹시 퀵소트에서는 공간복잡도를 사용하지 않나요?

Copy link
Contributor Author

@sungjinwi sungjinwi Dec 14, 2024

Choose a reason for hiding this comment

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

저도 C 라이브러리의 qsort에 대해 정확히 아는 바가 없어서 시간복잡도와 공간복잡도는 제대로 계산 못 했던거 같아요
찾아보니 퀵소트는 구현방법에 따라서 O(n) 또는 O(1)로 공간복잡도를 가질 수 있지만 C표준에서는 따로 복잡도에 대해 언급된 부분이 없어서 정확한 계산은 못할 것 같아요
심지어 이름만 qsort이고 퀵소트와는 관련도 없을수도 있다고 하네요..ㅠ (해당 사이트의 Note부분)
앞으로 좀 더 찾아보고 사용하는 습관을 들여야겠습니다
좋은 지적 감사드려요!

@SamTheKorean SamTheKorean merged commit 026e627 into DaleStudy:main Dec 15, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: Completed
Development

Successfully merging this pull request may close these issues.

3 participants