Skip to content

Conversation

pardhusnc2004
Copy link

**PR Checklist:

  • My addition is referred to in the language README.md file
  • My addition does not have a spelling problem
  • My submission has a proper and user-friendly description of the algorithm
  • 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
  • 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant