Onsite
Cutting Squares of Cake with Binary Search
GoogleSoftware Engineer · Onsite · Sep 2025
One of my interview questions: There's a table, and the top-left corner of the table is the origin (0, 0). On the table there are countless non-overlapping square cakes of different sizes. The question: how do you make one horizontal cut (parallel to the x-axis) so that after the cut, the total cake area on each side is equal? The interesting part is that all the coordinates are floats, but the s…
Shared by a candidate · reported Sep 2025. Interview formats change; use it as a guide, not a script.