We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
The second loop was iterating through the list to calculate the sum of each subarray of size m by removing the first element and then adding the m'th element back. If that makes sense.
Subarray Division
You are viewing a single comment's thread. Return to all comments →
The first loop was initializing the sum.
The second loop was iterating through the list to calculate the sum of each subarray of size m by removing the first element and then adding the m'th element back. If that makes sense.
I cleaned it up with Linq.