Stock Picker

Ruby

Simple method that takes an array of stock prices, each item representing a day. Returns the best days to buy and sell that would yield the greatest profit.