This question already has an answer here:
I am trying to write a method that takes an array of strings as its argument and returns array.reverse without actually using reverse (using Ruby). Most of my attempts have resulted in adding nils to the array. I can't track this algorithm down. Do you have a solution?