Search
⌘K

Leetcode 985. Sum of Even Numbers After Queries

Given nums and queries where each query adds a value to nums[index], return the sum of even numbers after each update. The challenge is to maintain and update a running sum of even elements efficiently (O(1) per query) by handling parity changes instead of recomputing the whole sum.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.