top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration

Facebook Login
Site Registration

Explain and implement a serialization of a binary tree.

+1 vote
92 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
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...