Skip to main content
All Questions

Compute what percentage of company Y is owned by company X.

Unlock detailed company stats for this questionUpgrade

Given ownership relationships where company A owns p% of company B, and two companies X and Y, compute what percentage of Y is owned by X. Notes: a company owns 100% of itself; there is no cyclic ownership.

Example: A owns 50% of B, B owns 50% of C, A owns 20% of C. What percentage of C is owned by A? Answer: 45 (DFS over the weighted ownership graph, multiplying along paths and summing across them).

Format · Technical interview.

Community answers

No answers contributed by the community yet.

Related courses

Course

Software Engineering Interview Prep

Land your dream software engineering role at Google, Amazon, Microsoft, Meta, Apple, and other top companies. Learn from mock interviews, frameworks, and advice from senior candidates—practice data structures, algorithms, system design, people management, behavioral interviews, and more.

Course

System Design Interviews

Learn how to answer the latest system design questions across product, infrastructure, and AI domains. Features in-depth video examples, written breakdowns, and helpful reference patterns. Watch senior engineers and managers answer these questions in mock interview videos.