1. partition the array in blocks of size w=4. The last block may have less then w. 2. Traverse the list from start to end and calculate max_so_far. Reset max after each block boundary (of w elements).
You may assume k is always valid, ie: 1 ≤ k ≤ input array's size for non-empty array.