Day 39 - Word Wrapping
Text justification turns out to be a bit of a tricky problem. This approach looks through all possibilities from every word to every other word and calculates an associated cost for having that range on a single line. The algorithm finds the total configuration that minimizes the costs of each range of words.
Not hard to see why this is important. Every web browser, word processor, text editor relies on some variation of a word wrapping algorithm. It’s fundamental, yet entirely invisible, and really non-trivial. Pretty neat.





















