Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 579. Find Cumulative Salary of an Employee
Given an employee table with manager relationships and salaries, compute for each employee the total salary of themselves plus all direct and indirect subordinates; the core challenge is traversing a self-referential hierarchy (tree/forest) efficiently. This typically requires recursive traversal (DFS/recursive CTE) to aggregate sums across multiple levels while handling deep nesting and multiple roots.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.