leetle

Daily challenge for 2025-09-20

263. Decode String

Given an encoded string, return its decoded string. The encoding rule is: k[encoded_string], where the encoded_string inside the square brackets should be repeated exactly k times.

Example:
Input: s = "3[a]2[bc]"
Output: "aaabcbc"

Note: k is guaranteed to be a positive integer.

Run this challenge interactively in Python or JavaScript when the app loads.