Range update and point query in segment tree ?

Правка en1, от Ahnaf.Shahriar.Asif, 2018-11-11 16:19:14

Recently I have to solve a problem like : given an array, update n times in range [Li..Ri] and then output the array .I updated them using segment tree and I found the array by querying indexes one by one. It took nlog(n). Can I do it in O(n) ? And additionally, can I find the condition of any index in O(1) ? Thanks in advance.

Теги segment trees, complexity optimization


  Rev. Язык Кто Когда Δ Комментарий
en1 Английский Ahnaf.Shahriar.Asif 2018-11-11 16:19:14 386 Initial revision (published)