educative.io

For Q5, Why the answer is D?

To check if a graph is bipartite or not, we can use BFS like the explanation says, so the time complexity should be O(E+V), right? Is there anything I got wrong? Can somebody tell me why the time complexity is O(V*E)?

Hi @Junqing_Long,

This is Fatimah Abdullah from Educative. I noticed your feedback here and Iā€™m glad you reached out to us.

Yes, that is correct!

Your answer is not wrong. The issue is on our side, and we are grateful that you reported it. I have updated the quiz to fix this mistake. Apologies for the inconvenience.

Thank you again for pointing this out! Please feel free to reach out if you have any other queries or concerns.

Best Regards,
Fatimah Abdullah | Developer Advocate
Educative Inc.

1 Like