Produce a valid deployment order

Quick Overview

This question evaluates proficiency in graph algorithms and dependency resolution, including concepts such as topological ordering, cycle detection, and complexity analysis, plus systems-level reasoning about service deployment dependencies.

Produce a valid deployment order

Company: Uber

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: medium

Interview Round: Technical Screen

You are given N services and a list of dependency pairs (A, B) meaning service B must be deployed before service A. Compute any valid deployment order of all services. If no valid order exists due to cycles, detect the cycle and return an appropriate indication. Describe and implement your approach (e.g., Kahn’s BFS-based algorithm or a DFS-based topological sort), analyze time and space complexity, and explain how you would handle partial deployments, retries, and failure recovery in production.

Quick Answer: This question evaluates proficiency in graph algorithms and dependency resolution, including concepts such as topological ordering, cycle detection, and complexity analysis, plus systems-level reasoning about service deployment dependencies.

|Home/Coding & Algorithms/Uber
Uber logo
Uber
Aug 12, 2025, 12:00 AM
mediumSoftware EngineerTechnical ScreenCoding & Algorithms
15
0

You are given N services and a list of dependency pairs (A, B) meaning service B must be deployed before service A. Compute any valid deployment order of all services. If no valid order exists due to cycles, detect the cycle and return an appropriate indication. Describe and implement your approach (e.g., Kahn’s BFS-based algorithm or a DFS-based topological sort), analyze time and space complexity, and explain how you would handle partial deployments, retries, and failure recovery in production.

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...