Eldest Ancestor and Descendant Count

Company: Goldman Sachs OA

Difficulty: medium