Dynamic Programming: Knapsack - Maximum Profit in Job Scheduling
Consider the following Python code implementing the optimal job scheduling solution. What is the value of
dp[2] after the loop iteration with i=2 when the input is startTime = [1, 2, 3], endTime = [3, 5, 10], and profit = [20, 20, 100]?