Twin Trees
CodeChefOpen on judge ↗
Given two trees T and T ' with same number of nodes N . Your work is to find out for every node U present in the tree the total number of nodes that are common in U's subtree in both the trees T and T ' Input - Each input file starts with single integer T number of test cases. - Each test case starts with single interger N the number of nodes in tree. - It is followed by a single integer X
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