Uber DS & Algo Questions asked in 2026
Uber

Uber DS & Algo Questions asked in 2026

DS & Algo questions for this list have been picked from Uber interview experiences shared on forums/blogs etc in 2026. Use this list for final preparation of Uber interviews.

2026DS & Algo

BPS (Business Problem Solving Round) will have a coding question (mostly hard) and may be 15 minutes of system design discussion. Phone screen also has DS & Algo questions.

For frontend roles, apart from DSA, you may be asked to create typescript components. Those are not included in below list.

DSA interview questions are more difficult than Amazon, Microsoft, Meta.

DS & Algo questions are asked for machine learning engineer role as well.

Below is list of questions that you can practice directly from leetcode (Free Ones):

Below is list of more Uber DS & Algo round interview questions. These also include follow up questions that were asked during interview round.

2

Check If Array Can Converge To Same Value

You are given a list of digits where every value is from 0 to 9. For each index, you may perform exactly one of these choices: add 1, subtract 1 or keep the value unchanged.
The digits are circular, so 9 + 1 = 0 and 0 - 1 = 9. Determine whether all elements can become the same digit after applying at most one such operation to each element.
If convergence is possible, return the final digit. If more than one final digit is possible, return the smallest such digit. If convergence is not possible, return -1.

https://codezym.com/question/217-array-converge-to-same-value
3

Longest Itinerary Route in a Directed Graph

You are given a list of allowed itineraries between cities. Each itinerary represents a directed route from one city to another city.

Design an algorithm to find the longest route that can be formed using the given itineraries. A route may start from any city and must follow only the given directed itineraries.

https://codezym.com/question/210-longest-itinerary-route
4

Earliest Timestamp When All Riders Are Connected

You are given a list of riders and a chronological list of Uber Share events. Each shared-ride event connects two riders. Two riders are connected if they have directly or indirectly shared rides through other riders.

Return the earliest timestamp when all riders become part of one connected shared-ride network. If all riders never become connected, return -1.

https://codezym.com/question/211-earliest-timestamp-riders-connected
5

Maximize XOR Score After Adding X

You are given a list of integers and an integer x. You may perform one operation at most once: choose any set of indices and add x to every chosen element.

After the operation, the score is the sum of XOR values of every pair of adjacent elements. Return the maximum possible score.

https://codezym.com/question/213-maximize-xor-score-after-adding-x
6

Count Distinct Islands In Grid

You are given a non-empty grid containing only 0 and 1.

Each 1 represents land, and each 0 represents water.

An island is a connected group of land cells. Two land cells are connected if they share a side horizontally or vertically.

You may assume that all four outer edges of the grid are surrounded by water.

Your task is to count how many distinct island shapes exist in the grid.

https://codezym.com/question/190-count-distinct-islands-grid
7

Minimum Cost Binary Search Tree From Words

You are given a list of distinct words and a corresponding list of positive costs. Construct a binary search tree using all words such that its inorder traversal gives the words in lexicographical order.

If a word is placed at level L, where the root is at level 0, its contribution to the total cost is (L + 1) * cost. Return the minimum possible total cost among all valid binary search trees.

https://codezym.com/question/214-minimum-cost-binary-search-tree-from-words
8

Design Employee Management System

Design an employee-manager system with exactly one CEO. The CEO has no manager. Every other employee has exactly one direct manager.

The system must support adding employees, getting an employee's manager, changing an employee's manager, and checking whether an employee works directly or indirectly under a manager.

https://codezym.com/question/215-design-employee-management-system
9

Minimum Cabs With Wait Period for Scheduled Bookings

You are given a list of scheduled cab bookings. Each booking has a start time and an end time. A cab can handle multiple bookings, but after completing one booking it must wait for a fixed wait period before starting another booking.
Find the minimum number of cabs required to complete all bookings.

https://codezym.com/question/218-min-cabs-with-wait-period
10

Biological Hazards: Valid Chemical Pair Intervals

You are given n chemicals labeled from 1 to n. Some pairs of chemicals are dangerous and cannot appear together in the same contiguous interval.
The lists poisonous and allergic describe forbidden pairs. For every index i, chemicals poisonous.get(i) and allergic.get(i) cannot coexist.
Count how many contiguous intervals [L, R] are valid such that the interval does not contain both chemicals from any forbidden pair.

https://codezym.com/question/219-valid-chemical-pair-intervals
11

Design Vote Share Display for Voting System

Design a voting system for a multiple-choice question with exactly 4 options. When a user clicks one option, that option receives one vote. After every vote, the system should return the updated vote percentage for all options.
The percentage of each option also represents how much color fill should be shown for that option in the UI. For example, if an option has 40% votes, then 40% of that option row should be filled with color.

https://codezym.com/question/220-design-mcq-voting-system
13

Maximum Comfortable Riders in a Car

You are given n riders and one car with unlimited space. Each rider has a comfort range for how many other riders must be present in the car.
A rider will ride only if the number of other riders in the car is within their comfort range. Return the maximum number of riders that can ride together in the car.

https://codezym.com/question/223-max-comfortable-riders-in-car
14

Find Robots in Location Map by Nearest Blockers

You are given a robot location map and a query describing required distances from a robot to the nearest blocker. Find all robots whose nearest blocker distances exactly match the query.

https://codezym.com/question/225-robots-by-nearest-blockers
15

First One Time Visitor in Stream of Customer Visits

You are given a stream of customer visits. Each visit contains one positive integer customerId. A customer is a one-time visitor if they have appeared exactly once in the stream so far.
Design a data structure that records customer visits and returns the earliest customer who has visited exactly once.

https://codezym.com/question/226-one-time-visitor-in-customer-visits-stream
16

Minimum Changes Circular Rock Paper Scissors

Engineers are sitting around a circular table and each engineer chooses one option from Rock, Paper, and Scissors. The choices are represented by the characters 'R', 'P', and 'S'.
Two neighboring engineers tie if they choose the same option. You may change any engineer's choice to either of the other two options. Return the minimum number of engineers whose choices must be changed so that no two adjacent engineers have the same choice.

https://codezym.com/question/228-minimum-changes-circular-rock-paper-scissors
17

Alien Language Letter Order

A new alien language uses lowercase Latin letters, but the order of the letters is not known.

You are given a list of non-empty dictionary words. The words are already sorted in lexicographical order according to the rules of this alien language.

Your task is to derive the lexicographically smallest valid ordering of letters in the alien language.

https://codezym.com/question/182-alien-language-letter-order
18

Microservice Restart Cycles

There are n microservices numbered from 0 to n - 1. Each microservice may depend on other microservices. A service can start only after all services it depends on have already started.
A dependency is considered satisfied if it started in any previous cycle or earlier in the current cycle.
Return the number of cycles needed to start all services using this process.

https://codezym.com/question/229-microservice-restart-cycles
19

Sorted Order of Squares

Given a list of integers sorted in non-decreasing order, return the original values arranged by the increasing order of their squares. If two values have the same square, the value that appears earlier in the input list should appear earlier in the output.

https://codezym.com/question/230-sorted-order-of-squares
20

Minimum Time To Burn Tree

You are given an undirected tree with n nodes numbered from 0 to n - 1. The fire can start from any node, and you may choose the starting node to minimize the total burning time. In each time unit, fire spreads from every burning node to all of its adjacent nodes. Return the minimum time required to burn the entire tree.

https://codezym.com/question/232-minimum-time-to-burn-tree