Text Justification
Format a list of words into lines of exactly maxWidth characters with full justification: pack as many words per line as possible, distribute extra spaces as evenly as possible between words (extra spaces go to the left slots), left-justify the last line and any line with a single word, and pad with spaces on the right. Print each line.
Constraints
1 <= n <= 300 1 <= len(word) <= maxWidth <= 100
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.