You are given an integer array prices where prices[i] is the price of a given stock on day i.
Find the maximum profit you can achieve by completing as many transactions as you like.
Note:
You cannot engage in multiple transactions simultaneously, which means you must sell the stock before buying again.
After you sell your stock, you cannot buy stock on the immediately following day due to a cooldown ofday.
Constraints:
prices.length
prices[i]
You are given an integer array prices where prices[i] is the price of a given stock on day i.
Find the maximum profit you can achieve by completing as many transactions as you like.
Note:
You cannot engage in multiple transactions simultaneously, which means you must sell the stock before buying again.
After you sell your stock, you cannot buy stock on the immediately following day due to a cooldown ofday.
Constraints:
prices.length
prices[i]