Hacker News new | ask | show | jobs
by jefftchan 3952 days ago
Great post! I found Fenwick trees particularly useful when I was implementing layout / view recycling. The problem is that you need to keep track of a large number of vertically stacked elements with dynamic & varying heights, and you need a way to efficiently get the prefix sum. Would be curious if anyone else has real life use cases of these.
1 comments

Thanks!. I have read that this data structure can be used for range updates and queries. Something that can also be done using Segment Trees. I haven't covered range updates in my article. It only talks about prefix sum and point updates. I will talk about range updates and segment trees in another article soon.