A set of tools to convert LeetCode text input data to a required type.
- List to a
TreeNode
structure.
Input: A text list containing numbers and null
s.
Example input:
"[1,2,3,null,4,null,5,6]"
.
Output: A TreeNode
structure.
- List of lists to a
vector
ofvector
s.
Input: A text list of text lists containing numbers.
Example input:
"[[1,2,3],[4,5],[6]]"
.
Output: A vector
of vector
s containing numbers.