uber logo
Uber· SDE II

Uber | SDE2

Posted
2 Mar 2026
420 reads

Summary

I applied via LinkedIn referral and had a coding round where I solved a problem to reorder elements based on the sorted order of their squares and partially solved a follow-up to find the k-th element.

How it went

Uber Interview Experience (Feb 2026)

Applied via LinkedIn referral. Recruiter reached out on 16th Feb and scheduled first round on 27th Feb.


Round 1 – Coding

The interviewer was Senior SDE.
5 minutes intro

Problem:
Given a sorted array, reorder the original elements based on the sorted order of their squares.

Input:  [-3, -2, -1, 0, 1, 2, 3, 4]
Output: [0, -1, 1, -2, 2, -3, 3, 4]

Approach:

  • Discussed brute force (square + sort) — didn’t code.
  • Then used a two-pointer / merge-style approach leveraging sorted input.
  • Implemented successfully.

Follow-up:

Return the k-th element from the above square-sorted order.

Input:  [-3, -2, -1, 0, 1, 2, 3, 4], k = 3
Output: 1
  • Extended earlier logic to return k-th element.
  • Then asked to optimize further.
  • Proposed a binary search-based idea.
  • Implemented it, but it failed for some edge cases. Couldn't complete.

5 minute outro, que-answer

Questions asked (2)

  1. 01

    Reorder Sorted Array by Squares

    Data Structures & Algorithms

    Given a sorted array, reorder the original elements based on the sorted order of their squares.

    Input:  [-3, -2, -1, 0, 1, 2, 3, 4]
    Output: [0, -1, 1, -2, 2, -3, 3, 4]
    
  2. 02

    K-th Element in Square-Sorted Array

    Data Structures & Algorithms

    Return the k-th element from the above square-sorted order.

    Input:  [-3, -2, -1, 0, 1, 2, 3, 4], k = 3
    Output: 1
    

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!