-
-
Notifications
You must be signed in to change notification settings - Fork 257
[DaleSeo] WEEK 08 solutions (워크플로우 테스트 용) #1969
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
base: main
Are you sure you want to change the base?
Conversation
| // TC: O(1) | ||
| // SC: O(1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DaleStudy 복잡도 분석이 정확해?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
안녕하세요! 새로운 솔루션을 잘 구현하셨네요. 시간 복잡도는 입력 크기(고정된 32비트)에 따라 O(1)로 적절히 표기하셨고, 공간 복잡도도 O(1)로 적합합니다. 가독성도 좋아서 이해하기 쉽고, 주석도 명확하게 달려 있어 좋습니다. 다만, 혹시 더 최적화하거나 다른 방법을 고려한다면, 비트 연산 대신 라이브러리 함수를 사용할 수도 있지만, 이 방식이 가장 직관적이고 효율적입니다. 앞으로도 다양한 접근법을 시도하며 연습하시면 좋겠습니다. 계속해서 좋은 코드 기대할게요!
|
좋은 시도와 깔끔한 구현에 먼저 박수를 보냅니다! 특히 32비트 정수의 각 비트를 역순으로 뒤집는 문제를 효율적으로 해결하셨네요. 시간복잡도 O(1)과 공간복잡도 O(1)로 적절히 분석하셨고, 명확한 주석도 이해를 돕고 있어 매우 좋습니다. 혹시 더 나은 접근법을 고려한다면, 만약 여러 호출에서 반복적으로 이 함수를 사용한다면, 캐시를 활용하거나, 비트 조작 기법을 더 최적화하는 방법도 생각해 볼 수 있습니다. 하지만 이 문제에서는 현재 방식이 충분히 효율적입니다. 가독성과 스타일 면에서도 특별한 문제는 없어 보입니다. 다만, Rust의 경우 계속해서 좋은 작업 기대하며, 깔끔한 리뷰 감사합니다! |
답안 제출 문제
작성자 체크 리스트
In Review로 설정해주세요.검토자 체크 리스트
Important
본인 답안 제출 뿐만 아니라 다른 분 PR 하나 이상을 반드시 검토를 해주셔야 합니다!