MCPcopy
hub / github.com/doocs/leetcode / append

Method append

solution/1600-1699/1622.Fancy Sequence/Solution.py:93–95  ·  view source on GitHub ↗
(self, val: int)

Source from the content-addressed store, hash-verified

91 self.tree = SegmentTree()
92
93 def append(self, val: int) -> None:
94 self.n += 1
95 self.tree.modifyAdd(self.n, self.n, val)
96
97 def addAll(self, inc: int) -> None:
98 self.tree.modifyAdd(1, self.n, inc)

Callers 15

find_all_pathsFunction · 0.45
generate_readmeFunction · 0.45
generate_category_readmeFunction · 0.45
formatMethod · 0.45
get_contestsFunction · 0.45
runFunction · 0.45
calculateScoreMethod · 0.45
zigzagTraversalMethod · 0.45
sortMatrixMethod · 0.45
dfsMethod · 0.45
minEdgeReversalsMethod · 0.45
minimumMovesMethod · 0.45

Calls 1

modifyAddMethod · 0.45

Tested by 1