Skip to content

Conversation

@lomuto
Copy link
Collaborator

@lomuto lomuto commented Jun 29, 2022

No description provided.

@kth990303 kth990303 changed the title 16주차 두번째 문제 제출합니다 [강윤석] 16주차 과제 제출합니다 Jun 29, 2022
Copy link
Collaborator

Choose a reason for hiding this comment

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

js는 '==' 와 '==='가 다르다는 것을 이번에 찾아보면서 또 배웠네요😊

Copy link
Collaborator

Choose a reason for hiding this comment

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

반복문을 대신해서 reduce함수를 사용하고 이부분에서 string을 2개씩 나누는 거군요!

Copy link
Collaborator

Choose a reason for hiding this comment

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

저는 2개씩 자른 영어문자열을 그냥 배열로 저장하고 모두 비교하는데 이렇게 map을 이용해서 같은 영어문자열은 중복해서 저장하지 않고 영어문자열을 key로 영어문자열의 개수는 value로 저장하는 방법도 좋은거 같습니다!

Copy link
Collaborator

Choose a reason for hiding this comment

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

맨해튼 거리가 2보다 같거나 작은 경우를 각각 나누어서 정해놓고 코드를 짜니 훨씬 깔끔하고 보기 좋아요😊

Copy link
Collaborator

Choose a reason for hiding this comment

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

맨해튼 거리가 1과 2인 경우 좌표가 유효한지 확인하고 1인경우는 바로 false를 리턴, 2인 경우는 위에서 정의했던 dx,dy값들을 이용해서 'X'인지 확인하니 코드가 정말 잘 이해됩니다!

@lomuto lomuto changed the title [강윤석] 16주차 과제 제출합니다 [강윤석] 17주차 과제 제출합니다 Jul 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants