Uber
More Experiences
Uber Technical Interview Experience (L4)
May 21, 2025 • 1 reads
Summary
I had a technical interview for an L4 role at Uber, where I was asked a grid-based problem involving robot placement and blocker detection. Unfortunately, I was not selected.
Full Experience
Verdit: Not selected
Interview Questions (1)
Q1
Find Robot Position with Specific Blocker Distances in a Grid
Data Structures & Algorithms
you have a grid with 3 type of elements O, X, E.
- O denotes robot
- X denotes blocker
- E denotes empty space
grid is of size M x N.
you are also given an array of size 4 with [L, T, B, R] which represents the closest blocker at distance L from left of robot, distance T from Top of robot, distance B from bottom of robot, distance R from right of robot. boundary outside matrix is considered as blocker.
give the position of the robot which satisfies given criteria if there is one, else return [-1, -1]
closest blocker should absolutely exist at given position L, T, B, R. if it does not, it's not valid robot.
grid = [
['E', 'X', 'E', 'E'],
['O', 'E', 'X', 'E'],
['E', 'E', 'E', 'X'],
['X', 'E', 'E', 'E']
]
blockers = [1, 1, 1, 1]