← All problemsSign in

Not So Even Tree

There is an infinite binary tree which has following structure: 3 / \ 6 8 / \ / \ 11 13 15 17 / \ / \ / \ / \ 20 22 24 26 28 30 32 34 ... This tree has a formula to get each node’s value. Base of the formula is even binary tree which is infinite tree made of even numbers with root node 2. Root node’s level is 1 and level of its child nodes is 2 and so on. Based on value of node in even tree and

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start