use this when the no of queries for actual array elemnts after update is less than number of update qurries.
prefix sum video link:
https://youtu.be/EjtGjvYKAnM
problem links:
kj and street lights:
https://www.hackerrank.com/contests/ab-yeh-kar-ke-dikhao/challenges/kj-and-street-lights
street Lights:
https://www.hackerrank.com/contests/algoholic-contest-1/challenges/street-lights/problem
Prateek and theories:
https://www.hackerearth.com/practice/algorithms/dynamic-programming/introduction-to-dynamic-programming-1/practice-problems/algorithm/prateek-and-theories-3/
B. Karen and Coffee:
https://codeforces.com/contest/816/problem/B
Download
0 formats
No download links available.
Range update in constant time(per query) | NatokHD