Optiver

Interview Question

Software Engineer Interview
Optiver

Given a list of tuples (AB, BC, AD, BE, CF), construct a binary tree and determine if it is a valid binary tree. You must check for the following five types of errors: (1) input is in the correct format; (2) no duplicate nodes; (3) the root has only two children; (4) every node is present in the tree; and (5) there are no cycles in the binary tree.

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!