uber logo
Uber· SWE I

Uber SWE I Online Assessment – Jan 2026

Posted
15 Mar 2026
416 reads

Summary

I underwent the Uber SWE I Online Assessment, a disqualification round featuring three distinct algorithmic problems covering graph theory, number theory, and advanced data structures. I tackled problems related to minimum spanning trees, connected components using prime factorization, and finding k-th greater elements using a segment tree.

How it went

Online Assessment (Disqualification Round)

Duration: 65 minutes


Questions asked (3)

  1. 01

    Uber City Network Construction - Minimum Spanning Tree

    Data Structures & Algorithms

    Problem 1 — Uber City Network Construction

    Uber is expanding its infrastructure to support faster dispatching across a city. The city is represented as a coordinate grid where n hubs are located at coordinates:

    (x_i, y_i)
    

    You can connect any two hubs i and j with a direct communication link.

    The cost of connecting two hubs is defined as:

    min(|x_i - x_j|, |y_i - y_j|)
    

    Determine the minimum total cost required to connect all hubs so that every hub can communicate with every other hub either directly or indirectly.

    Constraints

    • 2 ≤ n ≤ 10^5
    • 0 ≤ x_i, y_i ≤ 10^9
  2. 02

    Uber Zone Clusters - Prime Factorization & DSU

    Data Structures & Algorithms

    Problem 2 — Uber Zone Clusters

    Uber optimizes driver dispatch by analyzing connectivity between city zones.

    Each zone i has a traffic signature:

    S_i
    

    Two zones are considered directly connected if:

    gcd(S_i, S_j) > 1
    

    Connectivity is transitive, meaning if zone A connects to B and B connects to C, all belong to the same cluster.

    Task

    Given an array of n signatures, return an array where each element represents the size of the cluster to which that zone belongs.

  3. 03

    Uber Demand Trend Analysis - k-th Element to the Right

    Data Structures & Algorithms

    Problem 3 — Uber Demand Trend Analysis

    You are given an array of integers:

    demandLevels
    

    For each index i, determine the index of the k-th element to the right (j > i) such that:

    demandLevels[j] > demandLevels[i]
    

    If such an element does not exist, return -1.

    Output indices follow 1-based indexing.

    Constraints

    • 1 ≤ n ≤ 10^5
    • 1 ≤ k ≤ 50
    • 1 ≤ demandLevels[i] ≤ 10^9

Know someone preparing? Send it to them:WhatsAppLinkedInX

Interviewed at Uber recently?

Write up your rounds while you still remember the questions. It helps the next person more than you would think.

Share your experience
Discussion 0

Questions for the author, or how your own interview compared.

Join the discussion

Sign in with Google to comment or ask the author a question.

No comments yet

Be the first to share your thoughts and start the discussion!