thanks for segment trees if possible then plzz try to start DP series as well !
@amit_dhyani8 ай бұрын
Thank you for your continuous support. Han jarur, i will try
@adityapushkar86567 ай бұрын
Will it be build(tree,nums,2*node+1,start,mid) or build(tree,nums,2*node+1,mid+1,end) ?
@amit_dhyani7 ай бұрын
Ohh, Thanks for pointing out. Yes it will be build(mid+1, end)
@Fam-m4i5 ай бұрын
It’s possible to build tree in 2*N space bro.
@amit_dhyani5 ай бұрын
@user-tt7po9td3x yes bro there are techniques in which we can store segment tree in less than 4n. But the technique that i have discussed will take atmost 4n. For your reference you can refer it. stackoverflow.com/questions/39542049/segment-tree-space-requirement Another reference www.quora.com/Why-does-a-segment-tree-need-a-4n-size-array-Why-not-2n-1 You can refer some other resource as well