← Questions

Horizontal line that splits the area of rectangles in half

0
GoogleCodingLast asked Jun 2026

A coding interview question asked in Google's first round (coding), last asked Jun 2026. It tests binary-search, geometry and sweep line.

You get a list of axis-aligned rectangles. Find the lowest horizontal line y = c such that the total rectangle area above the line equals the total area below it.

Sign in to unlock this question

The full prompt, the worked answer and your own canvas or code with the AI tutor. New accounts get 5 credits: each one unlocks a question for good.

Where it's asked

  • Google · First round: coding · Last asked Jun 202645 min · Coding in a Google Doc, no syntax highlighting or autocomplete · No AI

What it tests

binary-search · geometry · sweep line

Your code and the AI tutor open when you unlock this question.