Available question text
Given a screen width and height, a sentence (words separated by spaces), and a font-size-dependent character width/line height model, find the largest integer font size that lets you fit the whole sentence on the screen without breaking words. This requires a feasibility check by greedily simulating word wrapping for a candidate size and using binary search (or monotonic search) over font sizes to maximize it.
Related questions
Continue with questions that share topics or the same question type.
- Sentence Screen Fitting
Coding
- All the Pairs With the Maximum Number of Common Followers
Coding
- Average Salary Excluding the Minimum and Maximum Salary
Coding
- Binary Tree Maximum Path Sum
Coding · Binary Tree · Depth-First Search · DP on Trees
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
No company association
Leetcode 1618. Maximum Font to Fit a Sentence in a Screen
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source