text: Compute sums of remaining windows by removing first element of previous window and adding last element of current window .
code: int curr_sum = res ; for ( int i = k ; i < n ; i ++ ) { curr_sum += arr [ i ] - arr [ i - k ] ; res = max ( res , curr_sum ) ; } return res ; }