Maximum Profit From Trading Stocks
A 0/1 knapsack over the budget: each stock is bought or skipped, and the table keeps the best profit per budget.
A 0/1 knapsack over the budget: each stock is bought or skipped, and the table keeps the best profit per budget.