← Flipkart questions

Employee salary calculation based on boss-employee relationships

Filed under Flipkart

Given a boss-employee relationship graph with no cycles, calculate the salary of each employee. Employees with no subordinates earn 1, and others earn the sum of their direct subordinates' salaries.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Flipkart questions

Collected from public candidate posts and coding forums. Updated Nov 2026.