Skip to content

[Wan] Week 1 #683

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

Merged
merged 5 commits into from
Dec 13, 2024
Merged

[Wan] Week 1 #683

merged 5 commits into from
Dec 13, 2024

Conversation

taewanseoul
Copy link
Contributor

@taewanseoul taewanseoul commented Dec 11, 2024

답안 제출 문제

체크 리스트

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

@taewanseoul taewanseoul requested a review from yeeZinu December 11, 2024 14:55
@taewanseoul taewanseoul requested a review from a team as a code owner December 11, 2024 14:55
@github-actions github-actions bot added the ts label Dec 11, 2024
Copy link
Contributor

@TonyKim9401 TonyKim9401 left a comment

Choose a reason for hiding this comment

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

첫주차 문제 풀이 고생 많으셨습니다!
남은 14주도 파이팅입니다!

Comment on lines +7 to +16
const set = new Set<number>();

for (let i = 0; i < nums.length; i++) {
if (set.has(nums[i])) {
return true;
}
set.add(nums[i]);
}

return false;
Copy link
Contributor

Choose a reason for hiding this comment

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

아래와 같이 한줄로 풀이하는 방법도 있을것 같습니다 :)
new Set(nums).size !== nums.length;

Comment on lines +10 to +12
const chars = s.replace(/[^a-z0-9]/gi, "").toLowerCase();

return chars === [...chars].reverse().join("");
Copy link
Contributor

Choose a reason for hiding this comment

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

정규식과 리스트 관련 함수를 잘 활용하신것 같아요 :)

@taewanseoul taewanseoul merged commit b901b4e into DaleStudy:main Dec 13, 2024
1 check passed
@DaleSeo
Copy link
Member

DaleSeo commented Dec 15, 2024

@taewanseoul 님, 프로젝트의 주차 지정이 안 되어 있이서 제가 대신 해드렸습니다. 스터디 진행 현황 파악에 중요한 부분이오니 다음 PR부터는 누락되지 않도록 주의 부탁드립니다. 관련해서 답안 제출 가이드도 참고하세요.

Shot 2024-12-14 at 21 35 16

@taewanseoul
Copy link
Contributor Author

@taewanseoul 님, 프로젝트의 주차 지정이 안 되어 있이서 제가 대신 해드렸습니다. 스터디 진행 현황 파악에 중요한 부분이오니 다음 PR부터는 누락되지 않도록 주의 부탁드립니다. 관련해서 답안 제출 가이드도 참고하세요.

확인 감사합니다! 주의하겠습니다.

*/
function longestConsecutive(nums: number[]): number {
const set = new Set(nums);
const sorted = [...set].sort((a, b) => a - b);
Copy link
Contributor

Choose a reason for hiding this comment

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

set을 사용하신김에 has로 원하는 수가 set안에 있는지 확인하는 방법을 사용할 수도 있을것같습니다!

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.

4 participants