Electrical Circuitree
CodeChefOpen on judge ↗
Dewansh has studied about binary trees and he made a problem of his own. Given a PERFECT BINARY TREE (A Binary tree is Perfect Binary Tree in which all internal nodes have two children and all leaves are at the same level.). Example of a Perfect Tree Now imagine the whole tree is an electrical circuit where each node of this binary tree is a bulb and each edge is an electrical wire. The bulb ca
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