diff --git a/content/data-structures/Treap.h b/content/data-structures/Treap.h index aa1d3da4a..222edb2a2 100644 --- a/content/data-structures/Treap.h +++ b/content/data-structures/Treap.h @@ -54,8 +54,8 @@ Node* merge(Node* l, Node* r) { } Node* ins(Node* t, Node* n, int pos) { - auto pa = split(t, pos); - return merge(merge(pa.first, n), pa.second); + auto [l,r] = split(t, pos); + return merge(merge(l, n), r); } // Example application: move the range [l, r) to index k