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.
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):
Maximum Number of Events That Can Be Attended
https://leetcode.com/problems/maximum-number-of-events-that-can-be-attended/Minimum Number of Refueling Stops
https://leetcode.com/problems/minimum-number-of-refueling-stops/description/Longest Path With Different Adjacent Characters
https://leetcode.com/problems/longest-path-with-different-adjacent-characters/description/Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit
https://leetcode.com/problems/longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit/description/Minimum Difference in Sums After Removal of Elements
https://leetcode.com/problems/minimum-difference-in-sums-after-removal-of-elementsSliding Window Maximum
https://leetcode.com/problems/sliding-window-maximum/description/Count the Number of Infection Sequences
https://leetcode.com/problems/count-the-number-of-infection-sequences/description/Find the Closest Palindrome
https://leetcode.com/problems/find-the-closest-palindrome/Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit
https://leetcode.com/problems/longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit/description/Exam Room
https://leetcode.com/problems/exam-room/description/Minimum Edge Reversals So Every Node Is Reachable
https://leetcode.com/problems/minimum-edge-reversals-so-every-node-is-reachable/description/LRU Cache
https://leetcode.com/problems/lru-cache/description/Shortest Palindrome
https://leetcode.com/problems/shortest-palindrome/description/Final Prices With a Special Discount in a Shop
https://leetcode.com/problems/final-prices-with-a-special-discount-in-a-shop/description/Water and Jug Problem
https://leetcode.com/problems/water-and-jug-problem/description/First Unique Number
https://leetcode.com/problems/first-unique-number/description/Cheapest Flights Within K Stops
https://leetcode.com/problems/cheapest-flights-within-k-stops/description/Maximum Points You Can Obtain From Cards
https://leetcode.com/problems/maximum-points-you-can-obtain-from-cards/description/Below is list of more Uber DS & Algo round interview questions. These also include follow up questions that were asked during interview round.
Find Vertical Line Rectangle Intersection Points
Given n infinite vertical lines on an XY plane and m axis-aligned rectangles, find the total number of intersection points made by the lines and rectangles.
https://codezym.com/question/216-vertical-line-rectangle-intersection-pointsCheck 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.
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-routeEarliest 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-connectedMaximize 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-xCount 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-gridMinimum 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-wordsDesign 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-systemMinimum 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.
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.
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.
Validate Organization Reporting Structure
You are given a reporting structure of people in an organization. Each entry is a string in the format "employee,manager", meaning the employee directly reports to the manager.
Determine whether the reporting structure forms one valid organization.
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.
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-blockersFirst 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.
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.
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-orderMicroservice 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.
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-squaresMinimum 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