Amazon Interview Question

Dynamic programming, trees and heap related problems.