Mono Tree
CodeChefOpen on judge ↗
Professor X of LMNTriX University is training his students for the various programming events. He found that the students can’t solve problems based on trees and graphs and so to improve their skills he has come up with a series of problems. The easiest of them is being given to you to solve. The problem is as follows: You are given a 1-indexed tree consisting of N nodes. Each node has a colour a
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