Fixed-Width Text Display
Asked at Otter.ai · Coding Questions · Difficulty: Hard
A display shows text in rows of exactly `width` characters. Given a list of words, lay them out row by row so that every row is exactly `width` characters long. You first build a simple left-aligned layout; the follow-up asks for a fully justified layout where the spaces inside each row are spread out.
Loading the problem…