euisblue
557. Reverse Words in a String III

Ruby

1def reverse_words(s) 2 s.split(' ').each { |s| s.reverse! }.join(' ') 3end