Giving Tree of Errors: Validate Parent-Child Pairs and Output Lexicographically Smallest S-Expression
Asked at Optiver · Coding Questions · Difficulty: Medium · Last asked Jul 15, 2026
Validate an unordered list of parent-child edges as a binary tree, and either report the highest-priority error code or print the tree's lexicographically smallest S-Expression.
Loading the problem…
More Optiver interview questions
- Best Time to Buy and Sell Stock with at Most k Transactions
- Beat the Odds — Probability Test (Optiver)
- QR Take-Home Data Project & Presentation
- Stock Transaction Sequence Counting (Catalan / DP)
- QR Technical Round — Brainteasers & Estimation
- Market-Making Interval Estimation Game