Infosys interview question

Graph Colouring Problem