EPI Python 9.16 Variant

#1

For 9.16 Compute the right sibling tree

Variant: Solve the same problem when there is no level-next field. Your result should be stored in the right child field?

I could not understand the spec/requirement from this Variant.
Is it to store level-next data into right child? or what?

Thanks,
GoodWish

1 Like

#2

Yes, that is the problem said. break the root to root.right connect, then use that connect to point to the level-next node

0 Likes

#3

Did anyone manage to do in O(1) space? Using BFS it’s O(n).

0 Likes