= max score to reach index . From , can jump to . Transition: . Array , . . . . . . .
Answer: 7. Monotonic queue gives instead of .
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
DP with window constraint
= max score to reach index . From , can jump to . Transition: . Array , . . . . . . .
Answer: 7. Monotonic queue gives instead of .