BST and heaps