Capcom interview question

Serialize/deserialize a binary tree