Decode a string with nested repeat counts
An encoded string uses k[...] to mean the bracketed part repeated k times, and brackets may nest, for example 3[a2[c]] decodes to accaccacc. Return the decoded string. Use a stack or recursion and handle multi-digit counts.
No answer yet. Write the first one; the best answer gets endorsed.
