Smarsh interview question

1. Heap allocation, coin change problem, trees