Uber Frontend Interview Experience
Uber's frontend interview process included an interesting interactive UI coding question that tested both frontend development and state management.
Interview Question — Interactive Shape Grid
You are given a 2D array representing a shape made up of empty boxes.
Your task is to build an interactive UI where:
Each empty box can be turned into a filled box when the user clicks on it.
Every selected box should be filled visually.
Once all the boxes have been filled, they should automatically be deselected.
The boxes must be deselected in the same order in which they were selected.
Expected Behaviour
The user clicks on an empty box.
The selected box changes into a filled box.
This continues until all boxes in the shape are filled.
Once all boxes are filled, the deselection process begins.
The boxes return to their original empty state, following the order of selection.
What This Question Tests
Dynamic UI rendering
Handling user interactions and click events
State management
Working with 2D arrays
Tracking the order of user selections
Implementing sequential UI updates
Solution
I attempted this question and worked on implementing the complete interaction flow.
Key Takeaway
Frontend interviews are not always about building complex applications. Even a simple-looking UI question can test your understanding of state management, data structures, and interaction logic.
Practice building interactive components and focus on handling different user interaction scenarios.


Discussions