Samsung Electronics interview question

Question based on subinterval (Dynamic programming)