The structure of tree must be maintained. How to serialize and deserialze it? Serialization is to store tree in a file so that it can be later restored. Given an N-ary tree where every node has at-most N children.
I have given the sequence from 1 to the number of nodes. Design an algorithm to serialize and deserialize a binary tree. Given a binary tree, how can you serialize and deserialize it? Serialization: Storing a given tree in a file or in an array.