As reported: Capital One Applied Researcher online assessment (1 hour), Feb 2026: four questions, two of them hard and one medium — counting lowercase and uppercase letters in a string, a problem like Minimum Number of Refueling Stops, a variation of Text Justification, and Number of Adjacent Elements With the Same Color.
Given words and maxWidth, format the text so each line has exactly maxWidth characters:
- pack as many words as fit on each line greedily (one space minimum between words);
- distribute extra spaces between words as evenly as possible, giving the left gaps more when they do not divide evenly;
- a line with a single word is left-justified and padded on the right;
- the last line is left-justified, with single spaces and padding on the right.
This is LeetCode 68 — Text Justification.
Example
words = ["What","must","be","acknowledgment","shall","be"], maxWidth = 16
->
["What must be",
"acknowledgment ",
"shall be "]
Constraints: 1 ≤ words.length ≤ 300; 1 ≤ words[i].length ≤ maxWidth ≤ 100.
Code runner format: line 1 words, line 2 maxWidth. Implement fullJustify(words, maxWidth); the harness prints the list of lines.