ishu9bansal / ideone

useful pieces of codes
1 stars 1 forks source link

Lazy segment tree #22

Open ishu9bansal opened 1 year ago

ishu9bansal commented 1 year ago

Implement a lazy segment tree, with update and query operations over a range.

ishu9bansal commented 1 year ago

A special case implementation where update operation is flipping the bit and query operation is count of on bits. https://leetcode.com/contest/biweekly-contest-98/problems/handling-sum-queries-after-update/