Why my code is showing segmentatuiobn fault

hello @harry_potter123
in ur buildtree function add one more base case.
i.e if(s>e) return;

not worked still showing segmentation fault and no test case passed

ok can u please share the problem link,so that i can check why it is failing

MINQUERY-I in segment tree challenges

link? i dont have access to the course challenges

we have to find minimum element with in a range l,r and we can also update an element at single index with another value

here is the question https://ide.codingblocks.com/s/228790

yeah i got it ,pls share ur code link again


add this line,
ur update function is only updating tree.

this line will update ur array as well.

still segmentation fault

still segmentation fault if the problem is updating array then it would give wrong ans but not ssgv

it is working fine,
image

https://hack.codingblocks.com/app/contests/1463/302/problem

oh thanks now test case are passed but in the ide it shows segmentation fault in coding blocks ide when no input is given