← Goldman Sachs questions

Convert string to binary tree and find largest root-to-leaf path

Filed under Goldman Sachs

Given a string representation of a binary tree (e.g., level-order with nulls), reconstruct the tree and find the maximum number of nodes on any path from the root to a leaf.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Goldman Sachs questions

Collected from public candidate posts and coding forums. Updated Nov 2026.