Uber | SDE2
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.
Full Experience
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
Interview Questions (2)
Reorder Sorted Array by Squares
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]
K-th Element in Square-Sorted Array
Return the k-th element from the above square-sorted order.
Input: [-3, -2, -1, 0, 1, 2, 3, 4], k = 3
Output: 1