Input: [""], 2
Expected: [" "]
As described ,the last line of text should be left justified and no extra space is inserted between words.Can anyone explain this?
For the last line of text, it should be left justified and no extra space is inserted between words.
This means all extra space added to the tail, not between words. In terms of your test case, there should be some demanded space at last.
Your explanation agrees with neither the requirement or the common sense. For the example in the original question, the last line be "justification.", rather than "justification. ", because the count for "between" is 0.
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.