Back to problems

Group Loans by Top-Level Company

Object-Oriented Programming · Affirm · Medium

Problem Statement Create a stateful loan processor. It is initialized with a collection of parent-child company relationships, then processes incoming loan records one by one. Implement the following LoanProcessor API: LoanProcessor(List > companyRelations) – initializes the processor with the company hierarchy. Each entry in companyRelations is a list [parentCompany, childCompany] denoting a direct ownership link. The hierarchy is acyclic and every company has at most one…

Checking your access…