euisblue
.about
.project
.blog
.cp
.dsa
.about
.project
.blog
.cp
.dsa
557. Reverse Words in a String III
Ruby
1
def
reverse_words
(
s
)
2
s
.
split
(
' '
)
.
each
{
|
s
|
s
.
reverse
!
}
.
join
(
' '
)
3
end