Given an array, and there are Q queries of two types.
Type-1 : given l , r , val
Update a[i] = a[i] xor val where i = [l , r]
Type-2 : given l , r
Return sum of a[i] where i = [l , r]
Can it be solved by segment tree with lazy propagation?
ThankYou :)