-
-
Notifications
You must be signed in to change notification settings - Fork 247
[yyyyyyyyyKim] WEEK 15 solutions #1655
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
Conversation
# 둘 중 하나만 없으면 False | ||
if not node1 or not node2: | ||
return False | ||
# 현재 노드 값이 다르면 False | ||
if node1.val != node2.val: | ||
return False |
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.
if not node1 or not node2 or node1.val != node2.val:
return False
return False인 값을 or로 연결해서 작성할 수 있을 것 같은데
이 부분은 가독성을 위해 if 문을 두 개로 나눠 작성하신 건지 궁금합니다.
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.
조건이 좀 더 명확하게 보이고 가독성을 높이기 위해 나눠서 작성했습니다~
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.
마지막 주차까지 오셨네요! 축하드립니다🎉
항상 열심히 풀이 올려주시는 것 보고 많이 배웠습니다.
그동안 고생 많으셨습니다!
답안 제출 문제
작성자 체크 리스트
In Review
로 설정해주세요.검토자 체크 리스트
Important
본인 답안 제출 뿐만 아니라 다른 분 PR 하나 이상을 반드시 검토를 해주셔야 합니다!