Skip to content

Files

Latest commit

4a23cf0 · May 1, 2016

History

History
1 lines (1 loc) · 141 Bytes

File metadata and controls

1 lines (1 loc) · 141 Bytes

Easy to find a O(n^2) solution, but you should do it with O(n), it's easy, maintain a variable that represents the lowest price that can buy.