Skip to content

Conversation

dusunax
Copy link
Member

@dusunax dusunax commented Dec 29, 2024

답안 제출 문제

체크 리스트

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

@dusunax dusunax self-assigned this Dec 29, 2024
@dusunax dusunax requested a review from a team as a code owner December 29, 2024 11:28
@github-actions github-actions bot added the py label Dec 29, 2024
@dusunax dusunax requested a review from jinah92 December 29, 2024 11:28
@DaleSeo
Copy link
Member

DaleSeo commented Dec 29, 2024

@dusunax 님, 프로젝트 주차 설정 좀 부탁드리겠습니다. (참고: 답안 제출 가이드)

Shot 2024-12-29 at 07 41 02

@dusunax
Copy link
Member Author

dusunax commented Dec 29, 2024

@dusunax 님, 프로젝트 주차 설정 좀 부탁드리겠습니다. (참고: 답안 제출 가이드)

넵 완료했습니다

Copy link
Contributor

@obzva obzva left a comment

Choose a reason for hiding this comment

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

수고하셨습니다

Comment on lines +17 to +19
#### TC is O(n):
- sorting the array. = O(n log n)
- iterating through the array just once to find the missing number. = O(n)
Copy link
Contributor

Choose a reason for hiding this comment

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

선아님 말씀대로라면 시간복잡도는 O(n logn)이어야 하지 않을까요?

Copy link
Member Author

Choose a reason for hiding this comment

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

아 네 잘못 작성했네요 감사합니다!

Comment on lines 55 to 65
n = len(nums)
xor_all = 0
xor_nums = 0

for i in range(n + 1):
xor_all ^= i

for num in nums:
xor_nums ^= num

return xor_all^xor_nums
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
Member Author

@dusunax dusunax Jan 4, 2025

Choose a reason for hiding this comment

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

하나로 수정했습니다👍

n = len(nums)
xor_nums = 0
for i in range(n + 1):
if i < n:
xor_nums ^= nums[i]
xor_nums ^= i
return xor_nums

Copy link
Contributor

Choose a reason for hiding this comment

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

빠르시네요!! 피드백 반영해주셔서 감사합니다

@obzva
Copy link
Contributor

obzva commented Jan 4, 2025

@jinah92 담당 PR 리뷰도 진행해주시길 바랍니다
참여자 역할 참고

@dusunax dusunax merged commit 33558fa into DaleStudy:main Jan 4, 2025
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