The function is given a string with some square brackets in it. You need to build the outcome string using the rule: k[substring] is replaced by the substring inside the square brackets being repeated exactly k times.
string_builder("3[a]2[bc]") ➞ "aaabcbc"
string_builder("3[a2[c]]") ➞ "accaccacc"
string_builder("2[abc]3[cd]ef") ➞ "abcabccdcdcdef"
k is a positive integer.