Software Engineer • Junior-Level
Software Engineer • Junior-Level
High QualityPractice Other Questions that Google Asked
Continue with targeted prep from Google's coding question bank and system design questions.
Interview Summary
The technical questions covered constructive grid placement, maximizing a non-decreasing subarray after changing one element, and resolving ordering constraints between two sequences.
Interview Details
Round 1 — Connected Crop Arrangement
The problem provided an N x M garden and K crop types. For each crop i, a required number of cells was given. The counts satisfied: sum(counts) = N * M so every grid cell had to contain exactly one crop.
The task was to construct any valid grid such that:
- Crop
iappears exactlycounts[i]times. - All cells containing the same crop form one connected component.
- Connectivity is only through up, down, left, and right movement.
- Diagonal cells are not considered connected.
Any arrangement satisfying all requirements was accepted.
-
Follow-Up — Two Square Gardens The follow-up changed the planting area from one rectangle to two square gardens placed adjacent to each other:
Garden A: N x N Garden B: M x MGarden A: N x N Garden B: M x M
Unlock Full Details
Create a free account to unlock this interview experience report.