Daily challenge for 2025-10-17
290. License Key Formatting
You are given a string s that consists of alphanumeric characters and dashes. The string is separated into n + 1 groups by n dashes. You are also given an integer k. Reformat the string so that each group contains exactly k characters, except for the first group, which could be shorter but still must contain at least one character. Dashes should be inserted between groups and all lowercase letters should be converted to uppercase. Return the reformatted string.
Example:Input: s = "5F3Z-2e-9-w", k = 4Output: "5F3Z-2E9W"
Run this challenge interactively in Python or JavaScript when the app loads.