A repository that contains all the Data Structures and Algorithms concepts and their implementation in several ways, programming questions and Interview questions. The main aim of this repository is to help students who are learning Data Structures and Algorithms or preparing for an interview.
[x] My addition is referred to in the language README.md file
[x] My addition does not have a spelling problem
[x] My submission has a proper and user-friendly description of the algorithm
[x] My submission has the time complexity of the algorithm
[ ] My submission has sample input-output of the program (NOT FOR PYTHON)
What kind of change does this PR introduce? (check at least one)
[ ] Bugfix
[x] New algorithm
[ ] Optimization in previous algorithms
[ ] Code style update
[ ] Refactor
[ ] Documentation
[ ] Other, please describe:
Briefly describe the changes in this PR
Added a segment tree algorithm in Python for efficient range query and update operations. This implementation supports both building the segment tree in O(n) time and performing queries and updates in O(log n) time. The segment tree is implemented using an array-based approach with recursion for queries and updates.
Other information:
Soon, I will be adding the implementations of all types of Segment Tree.
**PR Checklist:
What kind of change does this PR introduce? (check at least one)
Briefly describe the changes in this PR
Added a segment tree algorithm in Python for efficient range query and update operations. This implementation supports both building the segment tree in
O(n)
time and performing queries and updates inO(log n)
time. The segment tree is implemented using an array-based approach with recursion for queries and updates.Other information:
Soon, I will be adding the implementations of all types of Segment Tree.