Amazon interview question

Dynamic programming, trees and heap related problems.