-
-
Notifications
You must be signed in to change notification settings - Fork 195
[Ujoonnee] Week 02 solutions #1213
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
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.
고생하셨습니다~! 😎
valid-anagram/Ujoonnee.java
Outdated
Arrays.sort(sChar); | ||
Arrays.sort(tChar); | ||
|
||
if (s.length() != t.length()) { |
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.
두 문자열의 길이가 다른 경우라면 문자 하나씩 비교하기 전에 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.
신경 쓰지 못했던 부분이네요. 날카롭게 찾아주셔서 감사합니다!
valid-anagram/Ujoonnee.java
Outdated
|
||
return true; | ||
} | ||
} |
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 하나 이상을 반드시 검토를 해주셔야 합니다!