본문 바로가기
나는 이렇게 학습한다/Algorithm & SQL

1115. Reversed Strings

by daco2020 2022. 11. 15.

Complete the solution so that it reverses the string passed into it.

'world'  =>  'dlrow'
'word'   =>  'drow'



Solution:

String solution(str) {
  return str.split('').reversed.join('');
}