Ive a problem with a programming exercise. I hope you can help me. In this exercise I need to find out what the maximum profit is of taking pictures from several items in a park. For taking pictures I only have 50 minutes.  Each item which you photograph has its own price. You can only photograph each item once.The exercise looks like this directed weighted graph: The profit of taking pictures of items is shown right. For this problem Im going to use dynamic programming memoization, but I dont know how to start. Ive seen code from the knacksack problem, but Im still stuck. If you have any tips I would be really thankful!This is the only code I have. The array for the names:N[0] = a;N[1] = bN[2] = cI got this array for the weights:W[0][0] = 100W[0][1] = 17W[0][2] = 40W[1][0] = 60W[1][1] = 100W[1][2] = 103W[2][0] = 23W[2][1] = 29W[2][2] = 100To get from the start to a, b or c it also cost time. I got the following array for that:SW[0] = 12SW[1] = 19SW[2] = 10
dynamic programming with memoization
algorithms;dynamic programming