나는 이렇게 학습한다/Algorithm & SQL

1115. Reversed Strings

daco2020 2022. 11. 15. 20:54
반응형

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('');
}


반응형