diff --git a/treap.hpp b/treap.hpp index e415516..daa20ca 100644 --- a/treap.hpp +++ b/treap.hpp @@ -125,6 +125,9 @@ public: two.first = split(two.first, k).first; root = join(two); } + void pop() { + remove(size()); + } count_type size() { return get_size(root); }