Amazon Interview Question

It was a binary tree related question