Leetcode 303- Dynamic Programming| Range Sum Query

preview_player
Показать описание
Topic: Dynamic Programming

Code:

Leetcode:

*Note* I claim no rights to this question. All rights belong to Leetcode. If I'm reviewing a solution that was from another Leetcode user or Leetcode itself I will give credit below.

Credit to :
Рекомендации по теме
Комментарии
Автор

Thanks for the video! I'd like to let you know that there is a small mistake. Your dp table should be [-2, 0, 1, -4, -2, -1], not [-2, 0, 1, -4, 2, 3].

Taeyang
Автор

more leetcode questions !!. and -- video voice is little low.

Ash-foqs
Автор

You can also return sumUpToInd[j] - sumUpToInd[i] + nums[i]; in the sumRange method so you dont have to do the check.

awowoosas
visit shbcf.ru