Add treap pop
This commit is contained in:
parent
53a53b7a03
commit
08556a4dcc
1 changed files with 3 additions and 0 deletions
|
@ -125,6 +125,9 @@ public:
|
||||||
two.first = split(two.first, k).first;
|
two.first = split(two.first, k).first;
|
||||||
root = join(two);
|
root = join(two);
|
||||||
}
|
}
|
||||||
|
void pop() {
|
||||||
|
remove(size());
|
||||||
|
}
|
||||||
count_type size() {
|
count_type size() {
|
||||||
return get_size(root);
|
return get_size(root);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue