Skip to content

Latest commit

 

History

History
10 lines (10 loc) · 455 Bytes

File metadata and controls

10 lines (10 loc) · 455 Bytes

Segment Tree templates in Python

Segment Trees are very powerful data structures to efficiently solve range/update query problems

This repository contains some templates for implementing segment trees in python
Note Any type of segment tree can be easily implemented by just making changes (specifying required operation like sum, difference, max, min, bitwise operators, etc.) in the code at :-

  • Line 9
  • Line 13
  • Line 19
  • Line 30