Uber | SSE | Screening Round | Reject
Summary
I recently had a screening round interview with Uber for a Senior Software Engineer role. During the interview, I was presented with a grid-based problem involving robot movement constraints, which ultimately led to a rejection.
Full Experience
I interviewed with Uber for an SSE (Senior Software Engineer) position. It was a screening round, and unfortunately, I was rejected after this stage. The main part of the interview involved solving a coding problem. I had to identify robots in a 2D grid that satisfied specific movement requirements based on a query array. It was an interesting problem that tested my ability to navigate a grid and check conditions efficiently.
Interview Questions (1)
You are given a 2D grid (Location Map) and a Query Array. The Location Map contains characters 'O' (robot), 'E' (empty space), and 'X' (blocker).
The Query Array specifies the exact distances a robot must be able to move before hitting a blocker in four directions:
- Left:
query[0]spaces - Top:
query[1]spaces - Bottom:
query[2]spaces - Right:
query[3]spaces
The boundaries of the map are also considered blockers.
Inputs:
| O | E | E | E | X |
| E | O | X | X | X |
| E | E | E | E | E |
| X | E | O | E | E |
| X | E | X | E | X |Query Array:
[2, 2, 4, 1]This means a robot must be able to move 2 spaces left, 2 spaces top, 4 spaces bottom, and 1 space right without hitting a blocker.
Task:
Return the coordinates of all robots that meet these exact movement constraints in all four directions.