Daily challenge for 2026-11-08
677. Format Menu Labels
Given a list of strings labels and an integer width, format each label so that its total length becomes equal to width by appending dot characters ('.') to the end of each label. Return the formatted labels in their original order.
Constraints:
There are 0–1,000 labels. Every label consists only of lowercase ASCII letters, may be empty, and already has length at most width. The width is an integer from 0 to 1,000. Padding uses literal dots and preserves label order.
Example:
Input: labels = ["tea", "coffee"], width = 8
Output: ["tea.....", "coffee.."]
Run this challenge interactively in Python or JavaScript when the app loads.