Kushagra and Coloring
CodeChefOpen on judge ↗
Kushagra was given a task by . He has to color a tree in such a way that no two adjacent nodes have the same colour. But kushagra is not artistic and decides to colour them with numbers. He decides to make it a challenge and find the minimum numbers he can colour the graph with such that the sum in minimum. Given a tree, help Kushagra determine the minimum colour sum can be achieved when the tree
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start