From ef426253caef0a20b751f6668cc240698ebbf6cb Mon Sep 17 00:00:00 2001 From: Matuush Date: Mon, 31 Mar 2025 19:55:16 +0200 Subject: [PATCH] Provide heap size outside --- treap.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/treap.hpp b/treap.hpp index 98c287a..2f14e46 100644 --- a/treap.hpp +++ b/treap.hpp @@ -109,4 +109,7 @@ public: two.first = split(two.first, k).first; root = join(two); } + count_type size() { + return get_size(root); + } };