From 3a347a0c1b397c6ed34a02e811c1df1f310221c9 Mon Sep 17 00:00:00 2001 From: Aayush Vyas <70998175+AayushVyasKIIT@users.noreply.github.com> Date: Sat, 28 Aug 2021 14:30:40 +0530 Subject: [PATCH] removed stdin for testing --- data_structures/DSU_path_compresssion.cpp | 30 +++-------------------- 1 file changed, 3 insertions(+), 27 deletions(-) diff --git a/data_structures/DSU_path_compresssion.cpp b/data_structures/DSU_path_compresssion.cpp index b0112d29e..ad8bc231c 100644 --- a/data_structures/DSU_path_compresssion.cpp +++ b/data_structures/DSU_path_compresssion.cpp @@ -98,36 +98,12 @@ class DSU{ } }; -/* -test case#1: - 5 11 - union 1 2 - get 3 - get 2 - union 2 3 - get 2 - union 1 3 - get 5 - union 4 5 - get 5 - union 4 1 - get 5 -*/ -/* -output case#1: - 3 3 1 - 1 2 2 - 1 3 3 - 5 5 1 - 4 5 2 - 1 5 5 -*/ + //T(n) = O(n) int main(){ - int n,q; - n = 10; q = 11; + int n; + n = 10; //n: number of items - //q: number of queries to be made DSU d(n+1); //set 1 cout << "set 1:"<