From 5feb4bb93df9a01b3c349dd4afa276a3d65cc416 Mon Sep 17 00:00:00 2001 From: Matuush Date: Wed, 9 Apr 2025 14:42:29 +0200 Subject: [PATCH] Generalize treap count type --- treap.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/treap.hpp b/treap.hpp index daa20ca..7eec0df 100644 --- a/treap.hpp +++ b/treap.hpp @@ -20,7 +20,7 @@ class treap { line* root; // Get size uf a subtreap - int get_size(line* l) { + count_type get_size(line* l) { if(l == nullptr) return 0; return l->size; } @@ -98,7 +98,7 @@ public: } // Line insert - void insert(int k, string s) { + void insert(count_type k, string s) { line *l = new line(rand(), s); if(root == nullptr) { @@ -110,7 +110,7 @@ public: two.first = join(two.first, l); root = join(two); } - void insert(int k, treap t) { + void insert(count_type k, treap t) { // TODO test auto two = split(root, k); two.first = join(two.first, t.root);