Given a list of strings word_list and an integer line_width, format the text so that each line contains exactly line_width characters and is fully justified. Words should be packed greedily, fitting as many as possible per line. Extra spaces should be distributed as evenly as possible between words. If the number of spaces does not divide evenly, slots on the left receive more spaces. The last line should be left-justified, with no extra spaces between words. Each words length is guaranteed to be greater than 0 and not exceed line_width'.
Example 1
Input: word_list = [Alpha, Beta, Gamma, Delta], line_width = 12
Output: [Alpha Beta, Gamma Delta]
Explanation: First line: Alpha and Beta with 2 spaces between. Second line: Gamma and Delta with 1 space.
Example 2
Input: word_list = [One, Two, Three, Four], line_width = 10
Output: [One Two, Three Four]
Explanation: First line: One and Two with 2 spaces. Second line: Three and Four with 1 space.
Example 3
Input: word_list = [A, B, C, D, E], line_width = 7
Output: [A B C, D E ]
Explanation: First line: A, B, C with 1 space each. Second line: D, E left-justified with extra spaces at the end.
Constraints
Case 1
Input: word_list = ['Hello', 'World', 'Python', 'Code'], line_width = 13
Expected: ['Hello World', 'Python Code ']
Case 2
Input: word_list = ['Data', 'Structures', 'Algorithms'], line_width = 15
Expected: ['Data Structures', 'Algorithms ']
Case 3
Input: word_list = ['Test', 'Case', 'Example'], line_width = 11
Expected: ['Test Case', 'Example ']