Bloomberg interview question

Validate binary tree, word ladder