PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Coding & Algorithms/Uber

Solve Two OA Algorithm Problems

Last updated: Apr 12, 2026

Quick Overview

These problems evaluate algorithmic optimization and graph connectivity competencies, specifically cost-constrained integer resource allocation for throughput maximization and spatial adjacency/connected-component reasoning for activation propagation.

  • hard
  • Uber
  • Coding & Algorithms
  • Software Engineer

Solve Two OA Algorithm Problems

Company: Uber

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: hard

Interview Round: Take-home Project

## Problem 1: Maximize Pipeline Throughput A pipeline contains `n` services connected in series. The overall pipeline throughput is the minimum throughput among all services. For service `i`: - Its base throughput is `t[i]`. - You may scale it up by a nonnegative integer number of times `x[i]`. - After scaling, its throughput becomes `t[i] * (1 + x[i])`. - The scaling cost is `x[i] * cost[i]`. You are given arrays `t`, `cost`, and an integer `budget`. Choose the scaling counts for all services so that the total cost does not exceed `budget`, and return the maximum possible overall pipeline throughput. --- ## Problem 2: Minimum Activations for Chain Adsorption You are given `n` balls on a 2D grid, where ball `i` is located at coordinates `(x[i], y[i])`. A ball can trigger another ball if: - they are in the same row (`y[i] == y[j]`) or the same column (`x[i] == x[j]`), and - the distance between them along that row or column is at most `d`. Adsorption is transitive: if ball `A` can trigger ball `B`, and ball `B` can trigger ball `C`, then activating `A` will eventually absorb `B` and `C` as well. In one operation, you may choose any single ball to activate. Return the minimum number of activations required to absorb all balls.

Quick Answer: These problems evaluate algorithmic optimization and graph connectivity competencies, specifically cost-constrained integer resource allocation for throughput maximization and spatial adjacency/connected-component reasoning for activation propagation.

Related Interview Questions

  • Maximize Throughput and Count Trigger Components - Uber (medium)
  • Replace Dashes With Nearest Letters - Uber (medium)
  • Find Earliest Column With One - Uber (easy)
  • Solve Wonderful Strings and Grid Queries - Uber (hard)
  • Count Islands After Land Additions - Uber (medium)
Uber logo
Uber
Jan 7, 2026, 12:00 AM
Software Engineer
Take-home Project
Coding & Algorithms
0
0
Loading...

Problem 1: Maximize Pipeline Throughput

A pipeline contains n services connected in series. The overall pipeline throughput is the minimum throughput among all services.

For service i:

  • Its base throughput is t[i] .
  • You may scale it up by a nonnegative integer number of times x[i] .
  • After scaling, its throughput becomes t[i] * (1 + x[i]) .
  • The scaling cost is x[i] * cost[i] .

You are given arrays t, cost, and an integer budget. Choose the scaling counts for all services so that the total cost does not exceed budget, and return the maximum possible overall pipeline throughput.

Problem 2: Minimum Activations for Chain Adsorption

You are given n balls on a 2D grid, where ball i is located at coordinates (x[i], y[i]). A ball can trigger another ball if:

  • they are in the same row ( y[i] == y[j] ) or the same column ( x[i] == x[j] ), and
  • the distance between them along that row or column is at most d .

Adsorption is transitive: if ball A can trigger ball B, and ball B can trigger ball C, then activating A will eventually absorb B and C as well.

In one operation, you may choose any single ball to activate. Return the minimum number of activations required to absorb all balls.

Submit Your Answer

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Uber•More Software Engineer•Uber Software Engineer•Uber Coding & Algorithms•Software Engineer Coding & Algorithms
PracHub

Master your tech interviews with 8,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.