394. Decode String

two stack

use this

one stack

recursion

T: O(k*n), k is call dfs times, n is String length

S: O(n)

or i as global variable

Last updated

Was this helpful?