Pregunta de entrevista de Amazon

Dynamic programming, trees and heap related problems.