Halloween SalePremium questions, over 30% offUnlock all premium questions for over 30% off
Text Layout Formatter
Hard
You are formatting a document page. Given paragraphs (a 2D array of words), aligns (alignment per paragraph), and width (maximum characters per line), produce a formatted page.
For each paragraph, pack as many words as possible onto each line separated by single spaces, starting a new line when the next word would exceed width. Pad each line to exactly width characters: ...
Asked at:Capital One
More Capital One interview questions
- [CodeSignal] Round-Robin Package Dispatcherhard
- [CodeSignal] Battery Rotation Schedulerhard
- Simplified Inventory Trackermedium
- Reach Corner in Grid With Teleportsmedium
- Even Position Monotonicityeasy
- Array Sum Pairs and Updatesmedium
- Rightmost Longest Character Runeasy
- [CodeSignal] Grid Arithmetic Pathhard
OfferRetriever
Master technical interviews with real questions from top companies. Build your confidence and career.
LEGAL
© 2026 Purple Business Holdings LLC. All rights reserved. See Terms of Service.