Find The Book With Worst Aggregate PnL In A Fund Hierarchy
Last updated: November 29, 2026
Quick Overview
The fund is a tree: the firm has portfolio managers, managers have books, and every node carries its own daily PnL. Return the name of the node whose subtree total PnL is lowest, along with that total.
Point72
November 29, 20260
0
0 solved
The fund is a tree: the firm has portfolio managers, managers have books, and every node carries its own daily PnL. Return the name of the node whose subtree total PnL is lowest, along with that total.
Point72 is organized as many investment teams rolling up into sectors and the firm, so risk tools constantly aggregate PnL up a hierarchy. This phone-screen question checks a clean post-order traversal and whether the candidate avoids recomputing subtree sums.
What the Interviewer Expects
- Recognize subtree aggregation as post-order traversal
- Compute each subtree sum once and reuse it
- Track the minimum while returning sums upward
- Handle negative values and single-node trees
- Mention an iterative version for very deep trees
Key Topics to Cover
How to Approach This
- Clarify input constraints and edge cases before writing code.
- Walk through your approach verbally and confirm with the interviewer before coding.
- Start with a brute force solution, then optimize. Mention time and space complexity.
- Test your solution with examples, including edge cases like empty input or duplicates.
- Consider common patterns: sliding window, two pointers, hash map, BFS/DFS, dynamic programming.
Possible Follow-up Questions
- How would you return the top three worst subtrees?
- PnL for one leaf updates intraday: how do you refresh totals without a full traversal?
- The hierarchy changes when a PM moves between teams: what structure supports that?
- How would you report the drawdown contribution of each child as a percentage?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice DSA ProblemsSample Answer
Requirements
Each node has its own PnL (a PM can hold positions directly) and children. Subtree PnL is the node's own PnL plus all descendants. Return the node with the minimum subtree total. Ties can go to whiche...
High-Level Design
Post-order depth-first search. A helper returns the subtree total for a node by summing its children's totals and its own PnL. While returning, compare against the running minimum. Each node is visite...