Citus Data interview question

A classical data structure (tree) question that can be solved with a recursive algorithm