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

[Sophia] Week4 Solution #428

Merged
merged 2 commits into from
Sep 8, 2024
Merged

[Sophia] Week4 Solution #428

merged 2 commits into from
Sep 8, 2024

Conversation

seona926
Copy link
Contributor

@seona926 seona926 commented Sep 5, 2024

답안 제출 문제

체크 리스트

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

let left = 0;
let right = str.length - 1;

while (left < right) {
Copy link
Contributor

Choose a reason for hiding this comment

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

저도 비슷하게 풀었습니다!
추가로, left와 right 변수를 반복문 안에서만 사용하므로, 굳이 미리 초기화하지 않고 바로 반복문에서 선언하는 방법도 있다는 생각을 해봅니다. 다만 가독성을 고려했을 때 (개인적으로) 현재 작성하신 코드가 더 좋다는 의견입니다! 😊

for (let left = 0, right = str.length - 1; left < right; left++, right--) {

@seona926 seona926 marked this pull request as ready for review September 6, 2024 16:39
@seona926 seona926 requested a review from a team as a code owner September 6, 2024 16:39
Copy link
Contributor

@HC-kang HC-kang left a comment

Choose a reason for hiding this comment

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

안녕하세요 @seona926 님!
4주차도 고생 많으셨습니다~!

@SamTheKorean SamTheKorean merged commit 33875e8 into DaleStudy:main Sep 8, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Completed
Development

Successfully merging this pull request may close these issues.

4 participants