Difference Array

Today I am going to introduce you to a pretty cool algorithm, which would allow you to update multiple ranges in an array in O(n) time ! Let's say you got an array, and you need to update ranges of it with given values. So as an input you would receive a two dimensional array … Continue reading Difference Array