LeetCode 122 Best Time to Buy and Sell Stock II in Java https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii/ Medium
In the Hint section for this problem we are suggested to solve it using Dynamic Programming among other approaches. If integersted in my comments I invite you to read the following post in my blog:
https://www.johncanessa.com/2021/10/20/best-time-to-buy-and-sell-stock-ii/
Keep in mind that one of the best ways to learn and refresh knowledge is to read and experiment.
Enjoy;
John