How can lazy propogation be implemented for segment tree in which we have two types of queries, one for finding maximum element in a given range and other is to divide elements in a given range by a number( not necessarily same for all elements like maybe each element is divided by its smallest odd factor or something of that sort)?
Asked
Active
Viewed 223 times
0
-
It can be implemented but the update process would be costly. – Saeid Sep 03 '16 at 18:44
-
Is there a way to do it in O(logn) complexity? – swap96 Sep 03 '16 at 19:35