30:00
Given an array of words and a maxWidth, format the text such that each line has exactly maxWidth characters and is fully (left and right) justified.
1≤words.length≤3001 \leq \text{words.length} \leq 3001≤words.length≤300
1≤words[i].length≤201 \leq \text{words}[i].\text{length} \leq 201≤words[i].length≤20
words[i] consists of only English letters and symbols.
words[i]
1≤maxWidth≤1001 \leq \text{maxWidth} \leq 1001≤maxWidth≤100
words[i].length≤maxWidth\text{words}[i].\text{length} \leq \text{maxWidth}words[i].length≤maxWidth
Justify 7 words with maxWidth=16
No lines yet...