Python Interview with a Google engineer.

Python Interview with a Google engineer

Interview Summary

Problem type: Seat Allocation
Interview question: A cinema has n rows of seats, numbered from 1 to n and there are ten seats in each row, labelled from 1 to 10.
Given the array reservedSeats containing the numbers of seats already reserved, for example, reservedSeats[i] = [3,8] means the seat located in row 3 and labelled with 8 is already reserved.
Return the maximum number of four-person groups you can assign on the cinema seats. A four-person group occupies four adjacent seats in one single row. Seats across an aisle are not considered to be adjacent, but there is an exceptional case on which an aisle split a four-person group, in that case, the aisle split a four-person group in the middle, which means to have two people on each side.

Example 1:

Input: n = 3, reservedSeats = [[1,2],[1,3],[1,8],[2,6],[3,1],[3,10]]
Output: 4
Explanation: The figure above shows the optimal allocation for four groups, where seats marked with blue are already reserved and contiguous seats marked with orange are for one group.

Example 2:

Input: n = 2, reservedSeats = [[2,1],[1,8],[2,6]]
Output: 2

Example 3:

Input: n = 4, reservedSeats = [[4,3],[1,4],[4,6],[1,7]]
Output: 4

Interview Feedback

Feedback about Meta Slide Rule (the interviewee)
Advance this person to the next round? Yes
How were their technical skills? 4/4
How was their problem-solving ability? 3/4
What about their communication ability? 4/4

Strengths:

Areas for Refinement:

Other:

I'd pass this person for Google L3 or Google L4 positions (Strong Hire).
For Google L5 leveling or higher, I'd place at (Hire).


Feedback about Purple Brontosaurus (the interviewer)
Would you want to work with this person? Yes
How excited would you be to work with them? 3/4
How good were the questions? 3/4
How helpful was your interviewer in guiding you to the solution(s)? 4/4

Strengths:

Improvements:

Interview Transcript

Purple Brontosaurus: So I won't disclose my name, but I've been working as a software engineer for almost like six years so far. I spent some time working for Google and other companies out here in the Bay Area. I'm your mock interviewer for today, so I just want to give a bit of an intro and. Yeah, can you tell me a bit more about yourself?

Meta Slide Rule: Yep, sure. So I am a software engineer. I have been working for a year and a half, almost two years, fresh out of college and I'm working at a series B startup. But I have a Google interview lined up for the on site. So I'm just prepping for that particular round.

Purple Brontosaurus: All right. I'm definitely wishing you best of luck. I've done on sites for Google. They are rigorous, but they are also passable.


Detailed feedback on the interview process and example coding problems were discussed but omitted for brevity.


Images


Example Interview Videos: