New answers tagged ruby
1
Your solution does the following:
downcase the string
convert the resulting string to an array of words
reverse the array of words
convert each word in the array so that the vowels are at the end and order is preserved for both the vowels and non-vowels
join the words in the resulting array to form a string
Let's begin with the penultimate operation. To ...
2
Consistency
Sometimes you are using 4 spaces for indentation, sometimes 2. Sometimes you are using vertical whitespace (an empty line) before a method definition, sometimes you don't. Sometimes you have whitespace at the end of a line, sometimes you don't. In one case, you indent a couple of lines just for no discernible reason.
You should choose one style ...
Top 50 recent answers are included
Related Tags
ruby × 1619ruby-on-rails × 564
beginner × 164
performance × 104
algorithm × 85
active-record × 84
object-oriented × 82
programming-challenge × 75
rspec × 65
strings × 58
array × 54
datetime × 42
unit-testing × 41
game × 34
parsing × 30
regex × 30
validation × 29
controller × 29
time-limit-exceeded × 24
comparative-review × 24
api × 23
sorting × 22
formatting × 21
csv × 19
file × 18