Getting wrong answer
question link is https://www.hackerearth.com/practice/data-structures/disjoint-data-strutures/basics-of-disjoint-data-structures/practice-problems/algorithm/owl-fight/
My code link
https://ide.codingblocks.com/s/330707
Owl Fight Hackerearth
Don’t do union by rank, here make the bigger number as parent.
Here is your corrected code https://ide.codingblocks.com/s/330811
Got your Point…
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.