# int maxProfit(vector<int>& prices) {
#     int sold = 0, hold = INT_MIN, rest = 0;
#     for (int i=0; i<prices.size(); ++i)
#     {
#         int prvSold = sold;
#         sold = hold + prices[i];
#         hold = max(hold, rest-prices[i]);
#         rest = max(rest, prvSold);
#     }
#     return max(sold, rest);
# }
# https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-cooldown/discuss/75928/Share-my-DP-solution-(By-State-Machine-Thinking)
