Back to problems

Text Box Formatter

Algorithm · Airbnb · Medium

This problem is a variation of the well-known text-justification exercise. Solving that problem first may be helpful. You receive a list named sentences. Every element is a non-empty string made up of printable ASCII characters and spaces. Produce a list of output strings that describes the formatted text. Give every sentence its own ASCII box according to these rules: Use the length of the longest sentence in sentences as the interior width for every box. Keep each sentence…

Checking your access…