Available question text
Support three operations on two equal-length arrays: flip a range of bits in nums1, add p * nums1[i] to each nums2[i], and report the sum of nums2. The challenge is to handle up to 1e5 operations efficiently by maintaining counts of ones under range flips (e.g., with a segment tree with lazy flip) and using that count to update/report nums2's sum in O(log n) per query.
Related questions
Continue with questions that share topics or the same question type.
- Sum of Even Numbers After Queries
Coding
- Sum of Matrix After Queries
Coding · Array · Hash Table
- Height of Binary Tree After Subtree Removal Queries
Coding
- Maximize Subarray Sum After Removing All Occurrences of One Element
Coding
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 2569. Handling Sum Queries After Update
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source