We have to write the nodes of a binary tree to a file. What is the most space efficient way of writing a binary tree . We can store it in array format with parent in positi
The 2i, 2i+1 (Binary Heap) method is indeed the best way if you have a (nearly) complete tree.
Otherwise you won't escape storing a ParentId (parent Index) with each node.