Greedy Algorithm: What is the Best Time to Buy and Sell Stock? April 8, 2016 algorithms, c / c++, greedy algorithm, math No Comments Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You … [Continue Reading...]