It’s giving error. Please Check
HOLI- Graph Problem
@Mansi2103 number of edges are n-1, so run loop from i=0 till n-2 . Also before inserting edge do x-- and y-- as you have taken the vertices from 0 to n-1.
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.