Optiver–styleSoftware Engineer InternSoftware Engineer InternQuestion #78
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.
Build Your Approach
State the assumptions, try a simple case, then work toward a general solution. Check the result and explain how it changes if an assumption changes.
Try the free diagnostic with worked solutions →Get Free Interview Prep Resources
More Optiver–Style Software Engineer Intern Questions
Design a double-ended queue (deque) data structure that supports efficient insertion and deletion from both ends. Explain the operations and their time complexities.Describe how you would implement a queue data structure.How would you implement a queue? As a follow-up, actually build a queue using an array.What is the difference between UDP and TCP?What is memory fragmentation, and how can it impact performance?
Practice the Reasoning Behind the Answer
Bring your target roles and interview timeline to a free quant consult. Discuss your preparation priorities and how Quant Blueprint’s lessons, practice and mock interviews can help.
Book a Free Quant ConsultYour goals · your preparation · your next steps