Amazon Interview Question

LP's and LC med (binary tree)