Leetcode 68. Text Justification (Java)

preview_player
Показать описание
3:52 It should be written as words[i].length();
22:00, 23:50 What I'm trying to say is, rowOutput at the end of the for loop may or may not be empty. If it's empty, it means the last row is full (with only one spaces in between the words) and it will go through rowJustifiy method, resulting in a correct justification because having only one space between the words is same as left justification. If it's not empty, we have to apply left justification to it.
Not a tutorial. Just documentation of my personal study.
If you wanna watch this, set the play speed to 1.5x.
Рекомендации по теме
visit shbcf.ru