Module 8 · Graphs and Trees · Binary Tree

Serialize and deserialize

Write the tree level by level with a queue, N for every missing child; reading the tokens back in the same order, every polled node takes the next two as its children.

Codec