Amazon interview question

Max heap, dynamic programming, find triplet in array