Amazon Interview Question

A difficult question about binary trees