Kumar-laxmi / Algorithms

A Repository for algorithms in C, C++, Python and Java
Apache License 2.0
322 stars 366 forks source link

Segment Tree #864

Closed hlw-aryan closed 1 year ago

hlw-aryan commented 1 year ago

The problem is to implement a segment tree data structure for efficient range queries and updates on an array.

I would like to implement a segment tree that supports the following operations:

Solution

Additional context Consider handling edge cases such as an empty array or invalid ranges. Discuss the time and space complexity of the segment tree operations and any trade-offs associated with the implementation. It would be helpful to include details about the structure of the segment tree, how the values are stored, and how the queries and updates are performed.

@Kumar-laxmi Please review the proposed implementation and provide feedback or suggestions for improvement.

Kumar-laxmi commented 1 year ago

Assigned! @hlw-aryan : C, C++, Python and Java

Kumar-laxmi commented 1 year ago

@hlw-aryan What is your status on this issue?

SPARSH1608 commented 1 year ago

@Kumar-laxmi Can I work on this?

hlw-aryan commented 1 year ago

Around 50% work done.