Please explain why are you adding the ans
Please explain why are you adding the ans
@sahazeer123 because as you can see in the video, it is calculated for every i, since we need the count of all the pairs thats why we are using it.
1 Like
Please provide some list problems solved using union find data structure
@sahazeer123 Apply dsu tag on codeforces or disjoint-set tag on spoj, you will have a list of questions you can do, sort them according to difficulty or acceptance rate.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.