While deriving the recursive formula for catalan number, Prateek Bhaiya asks us to select only one of the possible combinations from the left and right side respectively and then add the value for all i. I don’t understand why we should consider only one of the possible BST’s on left and right side.
Doubt in the derivation of recursive relation of catlan number
@pawan2179 he didnt mean 1 he meant choose 1 so 1 from left x 1 from right gives all possible combinations for that root i
for all i 1 to n make i as root node then ans+=f(i-1) x f(n-i) (this will consider all combinations)
hope its clear if yes dont forget to hit like and mark resolved