Given an containing daily share prices

Given an containing daily share prices , You can buy once and sell once , find the maximum profit you can make
Given input : { 10,3,1,19,8}

Maximum profit = 19-1 = 18

Comments (4)