Adi Similar Leaves
CodeChefOpen on judge ↗
Adi is living in a house densed by Apple trees. He always likes the Apples when they are of same weight. So he asks us to do the job with single Apple tree. Adi has a rooted Apple tree with him whose nodes are numbered from 1 to N. The fruits of the Apple tree is the first parent of the leaf nodes. Leaf nodes are nodes which do not have any child nodes i.e, There will be no nodes present after
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