Skip to content
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

Merged
merged 5 commits into from
Sep 8, 2024
Merged

[crispy] week 4 solution #409

merged 5 commits into from
Sep 8, 2024

Conversation

heozeop
Copy link
Contributor

@heozeop heozeop commented Sep 1, 2024

답안 제출 문제

체크 리스트

  • PR을 프로젝트에 추가하고 Week를 현재 주차로 설정해주세요.
  • 바로 앞에 PR을 열어주신 분을 코드 검토자로 지정해주세요.
  • 문제를 모두 푸시면 프로젝트에서 Status를 In Review로 설정해주세요.
  • 코드 검토자 1분 이상으로부터 승인을 받으셨다면 PR을 병합해주세요.

@heozeop heozeop self-assigned this Sep 1, 2024
@heozeop heozeop added the c++ label Sep 1, 2024
@heozeop heozeop requested a review from wogha95 September 1, 2024 06:36
@heozeop heozeop changed the title heozeop: valid palindrome [crispy] week 4 solution Sep 2, 2024
@heozeop heozeop marked this pull request as ready for review September 6, 2024 11:05
@heozeop heozeop requested a review from a team as a code owner September 6, 2024 11:05
Copy link
Contributor

@wogha95 wogha95 left a 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드리겠습니다~!! 👏

Comment on lines +11 to +16
if(exisingNum.find(num - 1) != exisingNum.end()) {
continue;
}

length = 1;
while(exisingNum.find(num + length) != exisingNum.end()) {
Copy link
Contributor

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)) {
Copy link
Contributor

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은 최대 깊이(문자열 길이)
Copy link
Contributor

Choose a reason for hiding this comment

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

시간복잡도에서 상하좌우의 4^L이 아닌 3^L로 계산하신 부분에 대해 설명이 궁금합니다!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

기존에 있던 방향은 확인하지 않아서 3^L로 계산했습니다!

@heozeop heozeop merged commit 1cb001f into DaleStudy:main Sep 8, 2024
1 check 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