my code is accepting at leetcode but giving wrong ans at hackerblocks and when i compile so it is giving me MLE error… i think i am doing wrong in taking input …
Graph is biparite or not
yes u r taking input in incorrect format.
read this . and make appropriate changes in ur code

pls check ur updated code here_>