You are viewing a single comment's thread. Return to all comments →
Can you explain this line
differenceArray[a] += k; if (b+1<=N) differenceArray [b+1] -= k; }
Why are you adding k to only differenceArray[a]??
Seems like cookies are disabled on this browser, please enable them to open this website
Array Manipulation
You are viewing a single comment's thread. Return to all comments →
Can you explain this line
differenceArray[a] += k; if (b+1<=N) differenceArray [b+1] -= k; }
Why are you adding k to only differenceArray[a]??