Back to problems

Find a Horizontal Cut That Bisects Total Rectangle Area

Algorithm · Google · Hard

Bisecting the Cake Platter Medium · Topics · Company Tags · Hints You have a set of rectangular cakes placed on a large baking sheet. The sheet is modeled as the Cartesian plane, and every cake is axis‑aligned. For each cake you are given four integers x, y, w, h: the bottom‑left corner sits at (x, y), the cake extends w units to the right (positive X direction), and h units upward (positive Y direction). You plan to make a single horizontal cut across the entire sheet. The…

Checking your access…