Can you tell my mistake

My output is not coming correct for the following
4 4
0 1
1 2
2 3
3 0

Now it’s working https://ide.codingblocks.com/s/575386

sir it is still not working …for bipartite it is giving not bipartite.

Please give an example tc. It’s working for the above tc

Sorry, I was clicking on my previous solution only. Yes it is coming correct

It’s alright. If you don’t have any further queries please mark the doubt as resolved.

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.