Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/codemistic/Data-Structures-and-Algorithms
/ SegmentTree.py
File
SegmentTree.py
Python/SegmentTree.py:None–None ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
1
class
SegmentTree:
# Every node has an index and a segment range
2
def
__init__(self,arr):
3
self.arr=arr
4
self.seg=[0]*(4*len(arr))
Callers
nothing calls this directly
Calls
5
SegmentTree
Class · 0.85
build
Method · 0.80
query
Method · 0.80
print
Function · 0.50
update
Method · 0.45
Tested by
no test coverage detected