ā” Build the skills to land top-paying quant jobs. Offer ends in 17d 22h 18m 48s17 days 22 hours 18 minutes 48 seconds.
ā” Build the skills to land top-paying quant jobs. Offer ends in 17d 22h 18m 48s17 days 22 hours 18 minutes 48 seconds.

Sign in to watch this lesson
Advanced - Data Structures and Range Queries Ā· 5:24
A range update stops at the O(log n) nodes that cover the range and leaves a note there; a note is handed to both children (a push) only when an update or query has to go below that node, and every parent recomputes its aggregate after its children return. Range add with point reads needs no push at all, range assignment does, and range add with range max or sum combines both, with sums scaling the note by the segment length. Mixed assignment and addition need one composition rule: an assignment wipes a pending addition, and an addition lands on a pending assignment.