1 | public class Codec { |
此题 rootVal < minValue || rootVal > maxValue 是关键,节省了对空节点序列化的空间。
Reference
449. Serialize and Deserialize BST
the General Solution for Serialize and Deserialize BST and Serialize and Deserialize BT - LeetCode
1 | public class Codec { |
此题 rootVal < minValue || rootVal > maxValue 是关键,节省了对空节点序列化的空间。
449. Serialize and Deserialize BST
the General Solution for Serialize and Deserialize BST and Serialize and Deserialize BT - LeetCode