Best Time to Buy and Sell Stock atmost B times
- Time : O(n∗min(n,B))
- Space : O(n)
c++
1 | int Solution::solve(vector<int> &A, int B) { |