YOE: 3years.
I recently interviewed with Amazon. The interview was 1 hour divided into three parts:
-
Introductions
The interviewer started by introducing herself, then asked me to introduce myself and briefly describe my background and experience. -
Leadership Principles
She asked three behavioral questions related to Amazon’s Leadership Principles (LPs), focusing on my past work experience. (Delivering under a tight deadline, Taking ownership beyond your direct scope...) -
Technical Question
The technical portion involved a parking garage problem - similar to this question.
Technical question: Parking Garage
You manage a row of N parking spaces, numbered from 0 to N - 1. Cars come in three sizes:
- Small: requires 1 space.
- Medium: requires 2 consecutive spaces.
- Large: requires 3 consecutive spaces.
Implement two operations:
park(size): Assign the leftmost available consecutive spaces and return the starting position. Return-1if no suitable spaces are available.leave(start, size): Free the spaces occupied by that car.
My first solution used a vector<bool> to track occupied spaces. My second approach used a map.


