Hello.
I have an exercise about a binary tree that, after several frustrated days and vain attempts, I'm not able to understand.
The problem simply is:
Given the following binary tree:

where the left node is the previous node plus one (y = x + 1) and the right node is the previous node plus two (y = x + 2), is it possible to reconstruct the binary tree having only the last number?
For example, how to differentiate:
2
/ \
3 4
from:
3
/ \
4 5
or to differentiate:
9
/ \
10 11
from:
10
/ \
11 12
Very thanks.
I have an exercise about a binary tree that, after several frustrated days and vain attempts, I'm not able to understand.
The problem simply is:
Given the following binary tree:

where the left node is the previous node plus one (y = x + 1) and the right node is the previous node plus two (y = x + 2), is it possible to reconstruct the binary tree having only the last number?
For example, how to differentiate:
2
/ \
3 4
from:
3
/ \
4 5
or to differentiate:
9
/ \
10 11
from:
10
/ \
11 12
Very thanks.