Skip to content

Conversation

limlimjo
Copy link
Contributor

@limlimjo limlimjo commented Dec 5, 2024

체크 리스트

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

@limlimjo limlimjo requested a review from a team as a code owner December 5, 2024 07:18
@github-actions github-actions bot added the js label Dec 5, 2024
@limlimjo
Copy link
Contributor Author

limlimjo commented Dec 5, 2024

@DaleStudy/coach
안녕하세요!
줄바꿈 누락으로 인해 오류가 발생한 것 같은데 이 경우에는 어떻게 해결해야할까요??

@HC-kang
Copy link
Contributor

HC-kang commented Dec 5, 2024

안녕하세요 @limlimjo 님!
제출하신 파일의 맨 밑에 개행문자(엔터)를 추가해주시면 됩니다!

Copy link
Member

@DaleSeo DaleSeo left a comment

Choose a reason for hiding this comment

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

다섯 문제 모두 잘 푸셨습니다!

image


// 시간복잡도와 공간복잡도
// 시간복잡도: 배열의 길이 n 만큼 for문 순회하므로 -> O(n)
// 공간복잡도: nums 배열 그대로 수정하여 계산 -> O(1)
Copy link
Member

Choose a reason for hiding this comment

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

입력 배열을 재활용하셔서 메모리를 절약하시는 게 알고리즘 고수 같기도 하고 뭔가 멋지게 느껴집니다 😎

Copy link
Contributor Author

Choose a reason for hiding this comment

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

아닙니다ㅜㅜ 완전 알고리즘 초보입니다ㅜㅜ
리뷰 감사합니다!

}

nums.sort((a, b) => a - b); // 오름차순으로 정렬
console.log(nums);
Copy link
Member

Choose a reason for hiding this comment

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

🧹

Copy link
Contributor Author

Choose a reason for hiding this comment

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

console을 찍어넣고 제거를 하지 못했네요

};

// 여기서 위 코드의 시간복잡도와 공간복잡도를 생각해보자...
// 시간복잡도 => O(m log m) ** 더 개선할 방법 찾아보기
Copy link
Member

Choose a reason for hiding this comment

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

혹시 찾으셨는지 궁금하네요 ㅋㅋ

Copy link
Contributor Author

Choose a reason for hiding this comment

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

아직 못 찾아 풀이와 다른 분들의 풀이 방법을 참고하려고 합니다!

Comment on lines +18 to +21
return true;
} else {
return true;
}
Copy link
Member

Choose a reason for hiding this comment

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

(안 중요) 요리하면 더 간단하지 않았을까 생각이 들었습니다.

Suggested change
return true;
} else {
return true;
}
}
return true;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

그렇네요! 리뷰 감사합니다

@limlimjo limlimjo merged commit 8f1e53e into DaleStudy:main Dec 13, 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.

3 participants