Text Justification

Text Justification

Given an array of non-empty words words and an integer maxWidth, format the text so that every output line contains exactly maxWidth characters.

Rules:

  • Pack as many wor...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: