Percolate interview question

binary tree, hashtables