Add append to treap structure
This commit is contained in:
parent
7ca8b1a3cb
commit
944b6759ff
1 changed files with 3 additions and 0 deletions
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue