ServiceNow interview question

Serialise binary tree