← Google questions
CodingReported in a candidate post, Mar 2025

Minimum lines needed to print a paragraph at a given width

Filed under Google

Given a paragraph and an integer width, return the minimum number of lines needed to print it. Version 1: a word may be split across lines. Follow-up: words cannot be split, leading spaces on a line…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Google questions

Collected from public candidate posts and coding forums. Updated Nov 2026.