Range Sum Query (Immutable) | Leetcode 303

preview_player
Показать описание
In this video, we take on a frequently asked interview problem -"Range Sum Query".
We start we a naive solution and then use prefix-sum of array to optimise the solution.

Chapters :
0:00 Range Sum Query Problem
1:59 Naive Solution ( O(n^2) Solution)
4:06 Intro to Prefix Sum
5:33 Deriving Formula for Prefix Sum
8:16 Solution Using Prefix Sum (Linear Time Solution O(n) )
11:07 Leetcode Solution

Hashtags
#precomputation #prefix #sum #optimise #dsa
Рекомендации по теме
join shbcf.ru