0385. Mini Parser
https://leetcode.com/problems/mini-parser
Description
Given a string s represents the serialization of a nested list, implement a parser to deserialize it and return the deserialized NestedInteger
.
Each element is either an integer or a list whose elements may also be integers or other lists.
Example 1:
Example 2:
Constraints:
1 <= s.length <= 5 * 104
s
consists of digits, square brackets"[]"
, negative sign'-'
, and commas','
.s
is the serialization of validNestedInteger
.All the values in the input are in the range
[-106, 106]
.
ac
Last updated