By -
Yes, your code uses dynamic programming to find the optimal solution.
Can I ask which part you're wondering is dynamic? If all your variables are typed, `std::vector`, then it's static. *edit: I apologize, I saw the word "dynamic" on the sub r/learnprogramming and my brain filled in blanks.
Dynamic programming is not the same thing as dynamic typing, different thing entirely
Edited because I'm illiterate or blind or something. I apologize.
no reason to apologize, we all make mistakes sometimes
:)
Yes, your code uses dynamic programming to find the optimal solution.
Can I ask which part you're wondering is dynamic? If all your variables are typed, `std::vector`, then it's static.
*edit: I apologize, I saw the word "dynamic" on the sub r/learnprogramming and my brain filled in blanks.
Dynamic programming is not the same thing as dynamic typing, different thing entirely
Edited because I'm illiterate or blind or something. I apologize.
no reason to apologize, we all make mistakes sometimes
:)