Topic: Greedy Algorithm Problem / Level: intermediate

Problem: Given an array of stock prices, find the maximum profit that can be made by buying and selling the stock at most twice.

Run the code to see the output here...