A data analyst is given an array data of integers representing daily data values. Elements may be positive, negative, or zero.
An array of range-negate updates is then applied in sequence. Each update updates[i] = [l, r] negates every element from index l to index r inclusively, using 1-based indexing. Negating an element means multiplying it by −1.
Ask AI Assistant

Ask AI Assistant
Ask me anything about this coding question!
Test Cases
Input
Output
Expected