I’m trying to query in the segment trees. But, it is giving segmentation fault.
I am not able to find out the error, Plz help me find it.
Here’s the link to my code: https://ide.codingblocks.com/s/343834
I’m trying to query in the segment trees. But, it is giving segmentation fault.
I am not able to find out the error, Plz help me find it.
Here’s the link to my code: https://ide.codingblocks.com/s/343834
The program is not taking any user input.
@siddharth_1_3277 you’ve updated the program, earlier it was taking input for n.
Anyhow,
here size of tree array is 30 but your loop is going till 40.
Yeah…Got it.Thanks
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.