Search⌘ K
AI Features

Text Justification

Text Justification reformats an array of words into exact-width lines, packing words greedily. Fully justify most lines, while the last line and single-word lines are left-justified.

Statement

You are given an array of strings, words, and an integer, maxWidth. Your task is to reformat the ...