Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
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_paths
Function · 0.45
generate_readme
Function · 0.45
generate_category_readme
Function · 0.45
format
Method · 0.45
get_contests
Function · 0.45
run
Function · 0.45
calculateScore
Method · 0.45
zigzagTraversal
Method · 0.45
sortMatrix
Method · 0.45
dfs
Method · 0.45
minEdgeReversals
Method · 0.45
minimumMoves
Method · 0.45
Calls
1
modifyAdd
Method · 0.45
Tested by
1
shortestCommonSupersequence
Method · 0.36