Your question is Dependency Graph Build Order. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
The SoFi app is assembled from software components with prerequisite relationships. Given all components and their dependencies, return an order in which every component can be built after its prerequisites. If a circular dependency makes a complete build impossible, return an empty list.
Implement build_order(components, dependencies).
components is a list of unique strings.dependencies is a list of two-element lists [prerequisite, component], meaning prerequisite must appear earlier than component.[] if no complete order exists.components.def build_order(components, dependencies):