Reported interview periodDec 2025–Aug 2026
Shared ancestor of two nodes in a binary tree
A binary tree arrives in level-order form along with two node values. Identify the lowest node whose subtree contains both values.
Practice focusRequirements - Line one is the level-order values separated by commas; null marks a missing child and the line may be wrapped in [...] . - Line two holds the two target values separated by a comma. - Node values are unique, and both targets appear in the tree. - A node counts as its own descendant, so a parent and child query answers the parent. - Return the value of the lowest shared ancestor as a decimal string, not its position in the serialization. - When one candidate ancestor lies below another, report the deeper one.…