String
394. Decode String
Decode strings like 3[a2[c]] → accaccacc, where k[...] repeats its contents k times and the brackets nest arbitrarily. Nesting is the signal to reach for a stack: each [ opens a new context that must…
Loading…
Decode strings like 3[a2[c]] → accaccacc, where k[...] repeats its contents k times and the brackets nest arbitrarily. Nesting is the signal to reach for a stack: each [ opens a new context that must…
Loading…