Google Interview Question

Mostly around heaps, backtracking and dynamic programming.