Iterative version segment tree not working for the question.

Правка en2, от Naveen_Kumar101, 2023-09-21 22:55:08

I was trying to solve a the question in Segment Tree section in Edu section (Segment Tree, Step2, Problem A (segment with maximum sum)) using iterative version of segment tree, but it's not working with it while the recursive version with the same logic works.

Could anyone please help with this? I am unable to find out where I am mistaking.

Code

Thanks.

Теги segment tree, range query

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский Naveen_Kumar101 2023-09-21 22:55:08 1338 Tiny change: 'n }\n}\n<spoiler>\n' -> 'n }\n}\n</spoiler>\n' (published)
en1 Английский Naveen_Kumar101 2023-09-21 22:41:49 3587 Initial revision (saved to drafts)