top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Explain and implement a serialization of a binary tree.

+1 vote
362 views
Explain and implement a serialization of a binary tree.
posted Jul 14, 2016 by Abhimanyu Singh

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

You can write serialization for leaf nodes, and then for parent nodes.

Recursive map: {value: [serialize(left), serialize(right)]}, where serialized leaf is null.

answer Jul 14, 2016 by Manikandan J
...