AAsana·DSASDE-2Onsite – Coding 1
Serialize/Deserialize a Binary Tree
Problem
Serialize a binary tree to a string and reconstruct it.
Example
[1,2,3,null,null,4,5] -> string -> tree
Constraints
- up to 10^4 nodes
Approach
Preorder with null markers.
added 6 days ago