Add treap pop

This commit is contained in:
Matúš Púll 2025-04-09 14:39:11 +02:00
parent 53a53b7a03
commit 08556a4dcc

View file

@ -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);
} }