Available question text
Given an array widths mapping each lowercase letter to its pixel width and a string s, pack characters sequentially into lines with a maximum width of 100 pixels and return [number_of_lines, width_of_last_line]. This is solved by greedily scanning s, accumulating letter widths and starting a new line whenever adding the next letter would exceed 100.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
Google
Leetcode 806. Number of Lines To Write String
Reported Mar 12, 2026 · 2 source reports
MID_LEVEL
Source snapshot: Nov 12, 2026
View source