Commit graph

1 commit

Author SHA1 Message Date
William Carroll
4d2d19f136 Solve InterviewCake's stock-price problem
Write a function that returns the maximum profit that a trader could have made
in a day. I solved this using a greedy algorithm which constantly sets the
maximum profit by tracking the lowest price we've encountered.
2020-03-01 22:32:25 +00:00