반응형
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('');
}
반응형
'나는 이렇게 학습한다 > Algorithm & SQL' 카테고리의 다른 글
1117. Reverse List Order (0) | 2022.11.17 |
---|---|
1116. Convert boolean values to strings 'Yes' or 'No'. (0) | 2022.11.17 |
1114. Exclamation marks series #6: Remove n exclamation marks in the sentence from left to right (0) | 2022.11.14 |
1113. Parse nice int from char problem (0) | 2022.11.13 |
1112. Sum of Multiples (0) | 2022.11.13 |