LinkedIn interview question

Serialize a binary tree