Skip to content

Conversation

lylaminju
Copy link
Contributor

@lylaminju lylaminju commented Dec 26, 2024

답안 제출 문제

체크 리스트

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

@lylaminju lylaminju requested a review from heypaprika December 26, 2024 15:25
@lylaminju lylaminju requested a review from a team as a code owner December 26, 2024 15:25
@github-actions github-actions bot added the py label Dec 26, 2024
@lylaminju lylaminju changed the title [Lyla] WEEK 03 solution [Lyla] WEEK 03 Dec 26, 2024
Copy link
Member

@DaleSeo DaleSeo left a comment

Choose a reason for hiding this comment

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

5문제 모두 완전 잘 푸신 것 같습니다!

image

Comment on lines +37 to +42
# 시간 복잡도: O(32)
# - 반복문이 32번 실행되며 각 작업(비트 이동 및 OR 연산)은 O(1).
# 총합: O(32) (상수 시간으로 간주 가능)

# 공간 복잡도: O(1)
# - 추가로 사용하는 변수 result와 n만 저장하므로 상수 공간.
Copy link
Member

Choose a reason for hiding this comment

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

아래 공간 복잡도 분석처럼 빅오 표현식에서는 O(32)O(1)로 표시해야할 것 같습니다.

Suggested change
# 시간 복잡도: O(32)
# - 반복문이 32번 실행되며 각 작업(비트 이동 및 OR 연산)은 O(1).
# 총합: O(32) (상수 시간으로 간주 가능)
# 공간 복잡도: O(1)
# - 추가로 사용하는 변수 result와 n만 저장하므로 상수 공간.
# 시간 복잡도: O(1)
# - 반복문이 32번 실행되며 각 작업(비트 이동 및 OR 연산)은 O(1).
# 총합: O(32) (상수 시간으로 간주 가능)
# 공간 복잡도: O(1)
# - 추가로 사용하는 변수 result와 n만 저장하므로 상수 공간.

Copy link
Member

Choose a reason for hiding this comment

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

두 개의 풀이 모두 멋지네요 😍

@lylaminju lylaminju merged commit e09f615 into DaleStudy:main Dec 28, 2024
3 checks 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.

2 participants