(This question is a variation of the LeetCode question 68. Text Justification. If you haven't completed that question yet, it is recommended to solve it first.)
You are given a list of sentences, where each element in sentences is a non-empty string containing printable ASCII characters and spaces.
Return the formatted text as a list of strings, where each sentence appears inside its own ASCII box, using the following formatting rules:
- Each box's inner width is set to the length of the longest sentence in
sentences. - Each sentence appears left-aligned in its box. If the sentence is shorter than the box width, pad the right side with spaces so its visible length matches the box width.
Ask AI Assistant

Ask AI Assistant
Ask me anything about this coding question!
Test Cases
Input
Output
Expected