← Google questions
CodingReported in a candidate post, Oct 2024

Determine line count for a string given a page width

Filed under Google

Given a string of characters and a horizontal page width, determine how many lines the string would occupy when wrapped, maintaining proper spacing in the output.

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.