Write a program to find the maximum profit in a stock market given stock prices for each day.
HardProblem Statement
Write a program to find the maximum profit in a stock market given stock prices for each day.
Sample Input
[7, 1, 5, 3, 6, 4]
Sample Output
Maximum Profit: 5
Limits
Time: 2s · Memory: 256 MB