Currently focusing on leetcode
IIITA'26
Checkout what I'm currently working on here:
https://rakim.bearblog.dev/devlog/
Update in O(1): You have to add 1 to all numbers [l, r]
Print final: O(n)
Reading the usaco.guide hints, I got to know that this is opposite of prefix sum!
So what we can do is keep track of differences and then use that to build the final array!
Update in O(1): You have to add 1 to all numbers [l, r]
Print final: O(n)
Reading the usaco.guide hints, I got to know that this is opposite of prefix sum!
So what we can do is keep track of differences and then use that to build the final array!