Pls tell me where is error in my code in coding blocks ide it is giving segmentation error

@devyanshbansal123,
code is good since u have made graph of 4 u can add edges upto 3, i.e 0,1,2,3
not above that

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.