Decode String at TikTok

Medium62.2% acceptance

This problem has 75.0% frequency at TikTok.

Problem Description

Given an encoded string, return its decoded string. The encoding rule is: `k[encoded_string]`, where the `encoded_string` inside the square brackets is being repeated exactly `k` times. Note that `k` is guaranteed to be a positive integer. You may assume that the input string is always valid; ther...

Read full problem and hints

Topics

Also asked at 40 companies


More TikTok Questions

View all TikTok questions