MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / __init__

Method __init__

Python/SegmentTree.py:2–4  ·  view source on GitHub ↗
(self,arr)

Source from the content-addressed store, hash-verified

1class 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))
5
6 def build(self,ind,low,high): # [low,high] = segment range
7 if low==high:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected