Efficient Array Storage for Binary Tree
One method which I like is to store the preorder traversal, but also include the ‘null’ nodes in there. Storing the ‘null’ nodes removes the need for also storing the inorder of the tree. Some advantages of this method You can do better storage than pre/post + inorder method in most practical cases. Serialization just … Read more