LeetCode 1458. Max Dot Product of Two Subsequences | JSer - JavaScript & Algorithm

preview_player
Показать описание
Suppose there is an optimal case, what is the relationship between this optimal result and the last element? if the last one is in the case ? or if it is not in it?

Think of this question might help reduce the problem into its sub problem.

Hi I'm a JavaScript engineer who is not good at algorithms,
and currently practicing leetCode online. If you are interested, maybe we can learn together.
Рекомендации по теме
Комментарии
Автор

Thank you for the video. I was writing a comment about how dp[i][j-1] if j==0 seemed like a bug but you fixed it by the time I finished my comment. Good job and thank you again for the video!

marcyanus
visit shbcf.ru