Compute Effective Group Ownership Across Layered Subsidiaries
Last updated: November 29, 2026
Quick Overview
Given direct shareholdings between legal entities as (owner, owned, percent), compute the parent's effective ownership of every entity it reaches, summing over all ownership paths, and detect cross-holding cycles.
EY
November 29, 20260
0
0 solved
Given direct shareholdings between legal entities as (owner, owned, percent), compute the parent's effective ownership of every entity it reaches, summing over all ownership paths, and detect cross-holding cycles.
Group structure charts drive consolidation scope, transfer pricing and tax residency work, and EY tax and transaction teams use tools that compute indirect ownership across hundreds of entities. The interviewer checks graph modeling, why a plain DFS that multiplies along one path is wrong when paths merge, and cycle handling.
What the Interviewer Expects
- Model holdings as a weighted directed graph
- Recognize that multiple paths into an entity must be summed
- Process entities in topological order so each share is final before propagating
- Detect cycles and explain why they need a different method
- State complexity and numeric precision concerns
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 compute ownership when cross-holdings form a cycle?
- How would you also report which entities exceed a 50% control threshold?
- How would you handle dated share transfers so the answer is as of a given date?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice DSA ProblemsSample Answer
Requirements
Input: edges (owner, owned, pct) with pct in [0, 1] and a parent id. Output: for every entity reachable from the parent, the sum over all paths of the product of percentages. If P owns 80% of A an...
High-Level Design
Run a DFS from the parent to get a topological order of the reachable subgraph, raising if a back edge appears (a cross-holding cycle). Then sweep in topological order: each entity's share is final on...