Uber online assessment interview

Round 2 of 6 · 19 questions reported

See the whole loop
Length
90 min
Format
Two problems on a HackerRank-based platform, camera and screen share on
They grade
Optimal solutions: brute force passes the examples but times out on hidden tests
AI use
No AI

Questions Uber asks in this round 19

  • Max-score jumps with primes ending in 3CodingYou are given a non-empty integer array nums of length n. You stand on index 0 and must finish on index n - 1. From index i you may move forward in one of two ways: - Step: move…
    Last asked Jun 2026
  • Maximize pipeline throughput within a scaling budgetCodingA message pipeline has n services in series, and every message passes through all of them. The pipeline's throughput is therefore the minimum throughput of any service. You are…
    Last asked Jun 2026
  • Minimum triggers to clear linked balls on a gridCodingYou are given n balls on a 2D grid. ballsi = xi, yi is the position of ball i, and you are also given a non-negative integer d. Two balls are linked when they lie on the same row…
    Last asked Jun 2026
  • Pick the root that needs the fewest edge reversalsCodingYou are given a tree with n nodes labeled 1 to n. Its n - 1 edges are directed: each edge (u, v) points from u to v. Ignoring direction, the edges connect all nodes into a tree…
    Last asked May 2026
  • Balanced prefixes in a permutationCodingYou are given a permutation p of length n: every integer from 1 to n appears exactly once, in some order. Call a number k (with 1 <= k <= n) balanced if some contiguous subarray…
    Last asked Apr 2026
  • Shortest subarray with at least k distinct valuesCodingYou are given an integer array arr and an integer k. Call a contiguous subarray good if it contains at least k different values. Return the length of the shortest good subarray…
    Last asked Apr 2026
  • Max purchases from a sorted price rowCodingA market hall has n stalls in a row, numbered 1..n. Stall i sells a single kind of item at price pricesi-1, and the prices are non-decreasing from left to right. A shopper may buy…
    Last asked Mar 2026
  • Lift-to-stairs switch with an energy budgetCodingYou start on floor 0 of a building with 0 energy and need to reach floor n. You ride the lift from floor 0 up to some floor k (0 <= k <= n), then walk the stairs from floor k to…
    Last asked Feb 2026
  • Count subarrays with at least k equal pairsCodingGiven an integer array and k, count the contiguous subarrays that contain at least k pairs of indices i < j with equal values. For example, 0, 1, 0, 1, 0 with k = 2 has 3 such…
    Possibly retired
  • One round of candy crush on a gridCodingAn integer matrix holds coloured blocks; equal numbers are the same colour and 0 is empty. Run one round: find every block that is part of a group to crush (clarify the rule; the…
    Possibly retired
  • Palindromic paths from a node to the rootCodingA storage system keeps its directories in a tree. Each directory holds one lowercase letter as a label. You are given: - arr: a list of n lowercase letters; arri is the label of…
    Last asked May 2026
  • Minimum knight movesCodingOn a chess board (possibly infinite), return the fewest moves a knight needs to get from one square to another. Use BFS, and consider symmetry or bidirectional BFS to make it…
    Last asked Apr 2026
  • Final prices after next-lower-price discountsCodingYou get a list of prices. Each item is discounted by the first later price that is lower than it (agree whether an equal price counts); an item with no such price pays full price…
    Last asked Feb 2026
  • Maximize the minimum asset value within an upgrade budgetCodingYou hold a portfolio of n assets. Asset i is currently worth valuesi. You can upgrade any asset as many times as you like. Each upgrade of asset i costs costsi and adds valuesi to…
    Last asked Jan 2026
  • Split tasks between two workers when one takes exactly kCodingThere are n tasks. Worker one earns reward1i for task i and worker two earns reward2i. Every task goes to exactly one worker, and worker one must do exactly k tasks. Return the…
    Possibly retired
  • Brightest position on a streetCodingEach street lamp has a position and a range, and lights every point within that range on both sides. Return the leftmost position lit by the most lamps.
    Possibly retired
  • Place fixed shapes on a grid in orderCodingYou get an n x m grid and a list of shapes, like Tetris pieces that neither rotate nor fall. Place them in order: each goes at the first position, scanning from the top-left…
    Possibly retired