Amazon interview question

Sorting, 2 Pointer, Recursion and DP