Leetcode 68: Text Justification

I quite liked this problem even though it seems to have a lot downvotes. It takes a while to solve because there is quite a lot of logic to encode but it is very doable. For me it was important to plan out the complicated case of the variable length spacing of multiple words on non-last lines. I thought through how to calculate these spaces by defining a bunch of dependant variables.

This entry was posted in programming and tagged , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published.