All Problems

Decode String

MediumstringExpected: O(maxK × n) time, O(m + n) spaceInterview Context
stack

Problem

Given an encoded string in the format `k[encoded_string]`, return the decoded string repeated k times.

Loading...