This a video editorial on the CodeChef February Long Challenge problem: Interval. We discuss the Dynamic Programming approach required to solve this problem, and how it works using an example.
Problem Statement:
https://www.codechef.com/FEB17/problems/INTERVAL
Solution:
https://www.codechef.com/viewsolution/13102591
Solution Start: 11:00
DP Approach: 3:51
Solving an Example: 17:30
Deque:
https://youtu.be/5VDQxLAlfu0
http://www.cplusplus.com/reference/deque/deque/
Dynamic Programming:
https://www.youtube.com/watch?v=OQ5jsbhAv_M
Finding Maximum among all ranges of fixed size in an array:
www.geeksforgeeks.org/sliding-window-maximum-maximum-of-all-subarrays-of-size-k/