-
Notifications
You must be signed in to change notification settings - Fork 126
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
[crispy] week 4 solution #409
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.
리뷰가 늦어 죄송합니다.!
set를 잘 활용하시고 깔끔하게 풀어주셔서 다른 언어임에도 이해하기 수월했습니다!
새로운 내장 함수들에 대해서도 배워가는 시간이 되어서 좋았습니다 :)
마지막으로 4회차 온라인 모임에서도 word-search 문제의 시간복잡도 4^L 또는 3^L의 이야기에 대해서 3^L로 계산해주셔서 crispy님의 설명을 듣고 싶습니다!
4주차 문제 푸시느라 너무 고생많으셨고 일단 approve드리겠습니다~!! 👏
if(exisingNum.find(num - 1) != exisingNum.end()) { | ||
continue; | ||
} | ||
|
||
length = 1; | ||
while(exisingNum.find(num + length) != exisingNum.end()) { |
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.
c++에서 find의 반환값(찾고자하는 값이 없는 경우)가 .end였군요!👍
bool isPalindrome(string s) { | ||
string temp = ""; | ||
for(char c : s) { | ||
if(isalnum(c)) { |
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.
오, isalnum 내장 함수에 대해서도 처음 알았네요!
@@ -0,0 +1,63 @@ | |||
// time complexity: O(n * m * 3 ^ L), L은 최대 깊이(문자열 길이) |
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.
시간복잡도에서 상하좌우의 4^L이 아닌 3^L로 계산하신 부분에 대해 설명이 궁금합니다!
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.
기존에 있던 방향은 확인하지 않아서 3^L로 계산했습니다!
답안 제출 문제
체크 리스트
In Review
로 설정해주세요.