Gopal and binary tree
CodeChefOpen on judge ↗
In an infinitely long complete binary tree Gopal travels according to his plan. At the start of the journey he is standing at the root. He has designed a string which directs his journey. The string is like this : l -> go left child r -> go right child u -> go up His Journey ends in certain level.He wants to know the sum of value of nodes in that level. The tree is numbered like this. root
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