Determine if a given graph is bi-colourable (bipartite). If yes, print the number of vertices with one of the colors followed by those vertices in sorted order; if no, print -1. Implement queues and…
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.