Add append to treap structure

This commit is contained in:
Matúš Púll 2025-04-09 10:31:47 +02:00
parent 7ca8b1a3cb
commit 944b6759ff

View file

@ -110,6 +110,9 @@ public:
two.first = join(two.first, l); two.first = join(two.first, l);
root = join(two); root = join(two);
} }
void append(string s) {
insert(size(), s);
}
// Line removal // Line removal
void remove(count_type k) { void remove(count_type k) {
auto two = split(root, k+1); auto two = split(root, k+1);