← Back
00:00

Binary Search Optimization Problem

Waymo interview questions · Hard · Coding round · reported 2× · 5 tests

You are given the text that must appear in the left and right columns of a two-column table and the total table width.

Choose a divider so both column widths are positive integers, the widths sum to totalWidth, and the resulting table height is minimized. Each column height is the number of wrapped lines needed to render its text, wrapping only between words.

Idle