Color The Graph!!!

You are given an acyclic, bidirectional graph with N nodes and M edges. The nodes are numbered from 1 to N. You are given Q queries.


This is a companion discussion topic for the original entry at https://toph.co/p/color-the-graph

@hjr265 please update the problem statement.

1 Like

Thanks again, @rkb_rd. The problem statement has been updated.

1 Like

Can be disconnected acyclic graph (like forest) ? or always it’s a connected acyclic graph?