Decode String at Bloomberg

Medium62.2% acceptance

This problem has 75.0% frequency at Bloomberg.

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 Bloomberg Questions

View all Bloomberg questions