Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ShahjalalShohag/code-library
/ insert
Function
insert
Data Structures/Treap persistent.cpp:66–70 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
64
return t;
65
}
66
node* insert(node* t, int pos, int val) {
67
node *l, *r;
68
split(t, pos - 1, l, r);
69
return merge(merge(l, new node(val)), r);
70
}
71
node* insert(node* t, int pos, node* x) {
72
node *l, *r;
73
split(t, pos - 1, l, r);
Callers
1
main
Function · 0.70
Calls
2
split
Function · 0.70
merge
Function · 0.70
Tested by
no test coverage detected