Optiver

Interview Question

Software Engineer Intern Interview
Optiver

Given a string representation of a binary tree, write a function to parse the string and construct the tree. Then, identify and return a list of errors found in the tree, such as nodes with more than two children, more than one root, or duplicate parent-child pairs.

Unlock the Full Solution

Enter your email to get instant access to the complete solution, explanation, and similar practice problems.

Insights on 100+ quant firms, understand where to apply, and maximize your chances.

Get the official 2025 QB Quant Firm Tier List

Check your email inbox — you should get the interview in 1-2 minutes!