Skip to content

[week1] 뒤집힌 문자열, 크기가 작은 문자열#9

Open
ckals413 wants to merge 2 commits intoSOPT-all:mainfrom
ckals413:week1/chamin-im
Open

[week1] 뒤집힌 문자열, 크기가 작은 문자열#9
ckals413 wants to merge 2 commits intoSOPT-all:mainfrom
ckals413:week1/chamin-im

Conversation

@ckals413
Copy link

@ckals413 ckals413 commented Nov 12, 2025

뒤집힌 문자열을 풀었어요

두개의 포인트를 잡았습니다.

  • 어떻게 문자열에 접근 할 것인가!
  • 문자열 익숙해지기

크기가 작은 문자열 문제는 map을 공부해보고 다시 풀어 볼 예정입니다!

@ckals413 ckals413 changed the title [week1] 뒤집힌 문자열 [week1] 뒤집힌 문자열, 크기가 작은 문자열 Nov 12, 2025
Copy link
Member

@sonms sonms left a comment

Choose a reason for hiding this comment

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

와 2문제를..! 열심히 하시는 모습이 너무 좋네요 역시 차민님 👍

Comment on lines +15 to +17
my_string.toCharArray().forEach(){
i -> answer = i + answer
}
Copy link
Member

Choose a reason for hiding this comment

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

문자열 덧셈(+)이 누적될 때 매번 새 String 생성이 되서 성능이 떨어질 수 있어요!

reversed()를 사용해보거나 StringBuilder를 사용해보시면 더 좋을 것 같아요!

Comment on lines 7 to 8
Copy link
Member

Choose a reason for hiding this comment

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

length는 중간에 변하지 않을 것 같은데 val로 선언해도 좋을 것 같아요!

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