3 ms·
Can you link to it / describe it?
by beagle3 9y ago
Can you link to it / describe it?
- sage76 9y agoThis is all I remember now : An array represents a binary tree like this : 1 / \ 2 3 \ / 4 5 / 6 is represented as : 1 2 3 * 4 5 * 6 so apart from the last level, any missing child nodes are represented as *. You need to find the set of unconnected nodes whose sum is maximum. Child-parent relationship means they are connected.