← Flipkart questions

Sum of dependencies for every node in a directed graph

Filed under Flipkart

Given a directed graph, where each edge from u to v represents a dependency (u depends on v), find the sum of the number of reachable dependent nodes for every node in the graph.

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.