-
Notifications
You must be signed in to change notification settings - Fork 20.8k
Description
Is your feature request related to a problem? Please describe.
I would like to add an implementation of Segment Tree to the Data Structures collection
Describe the solution you'd like
The data structure would be implemented using an array and would support range sum and point update queries in O(logN) time. The space complexity would be O(4 * N) where N is the number of element of the array for which we would build the Segment Tree.
Additional context
It supports a variety of other operations also, like finding maximum in a range which would not be supported by Fenwick Trees. A list of operations that can be done with Segment Trees can be looked up here
As part of Hacktoberfest 2021, I would like to add this implementation, could you please assign this to me @siriak.
Thank you