Google Interview Question

Basic coding problem to test data structures and algorithms knowledge. Think recursion, heaps, binary search trees, that kind of stuff.