Help in the topic segment tree

Revision en1, by tomnjerry18, 2021-06-21 18:20:23

Hi guys, I have been learning segment trees from Segment Trees Hackerearth .

I am trying to solve the problem range minimum query problem given in the end the topic. I am getting wrong answer in the second input in which n = 10^5 and number queries are also 10^5.

Can anyone help me to debug the code? Link to my code Online C++ Compiler.

Tags #segment tree, #range query, #range update

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English tomnjerry18 2021-06-21 18:20:23 512 Initial revision (published)