Arrays

This line slows the algorithm down a little bit. You have to run through the array twice to find the index. If you had used array.each_index on line 7 instead, you could have ran through the array only once.