Jane Street

Interview Question

Quantitative Analyst Interview
Jane Street

Design a heap data structure that supports adding elements and removing the top element, with the following constraints: (1) The topmost element must always be less than the topmost element in the left and right child subtrees; (2) The left child subtree must have as many or one more element than the right child subtree. The heap should also support a 'min' function (returns the value at the top of the tree) and an 'empty' function (returns an empty tree). Provide a description and implementation of such a data structure.

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!