Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6de1058

Browse files
authored
Update 0557-reverse-words-in-a-string-iii.kt
1 parentc289a7b commit6de1058

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

‎kotlin/0557-reverse-words-in-a-string-iii.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,6 @@ class Solution {
1616
return res.joinToString("")
1717
}
1818
}
19+
20+
//Kotlin idomatic
21+
funreverseWords(s:String)= s.split("").map { it.reversed() }.joinToString("")

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp