# @param {Integer[]} prices # @return {Integer} def max_profit(prices) v=1<<128 prices.zip(prices.map{|k|v=[k,v].min}).map{|i,j|i-j}.max end루비 숏코딩 실전