No. of nodes in a recursive segment tree of an array of size n is 2n-1.
But still choosing 2n- 1 as the size of segment tree gives a segmentation fault, and I have seen it in many places that it’s recommended to use size of segment tree as 4n. But why?
Can someone clarify on this?