Amazon interview question

Binary search tree and Binary Heap