Microsoft Interview Question

serialising binary tree