Python data engineering interview problem. Difficulty: advanced. Pattern: Graphs. About 20 minutes. Part of the Pro drill bank.
Services must build in an order that respects dependencies: a library before the app that imports it. Produce a valid topological order.
Return a topological build order for a service dependency map.
Input: build_order({'app': ['lib'], 'lib': []}) Output: ['lib', 'app'] This input follows the stated rules and produces this output.
Topics: lakebench, python, graphs.
More Python interview questions · All interview problems · Learn data engineering
Interview-style drill: Given service dependencies, return a valid build order that respects every dependency.
Return a topological build order for a service dependency map.