0 votes 0 votes the number of binary search trees with 4 nodes (1 , 2 , 3 , 4) where 1 is always a leaf node? Programming in C binary-search-tree + – Ashwani Yadav asked Jan 1, 2019 Ashwani Yadav 555 views answer comment Share Follow See all 6 Comments See all 6 6 Comments reply Show 3 previous comments Gupta731 commented Jan 1, 2019 i edited by Gupta731 Jan 1, 2019 reply Follow Share Fix 1 as leaf node ( Its the lowest key so it will always be left child of some node in left subtree) Permute the remaining 3 nodes using catalan number $\frac{\binom{2n}{n}}{n+1}$ using n=3 1 votes 1 votes Ashwani Yadav commented Jan 1, 2019 reply Follow Share bro i think there is a mistake " it will always be right child of some node in right subtree" but i see what u intended, as we know 1 will be the leaf we just have to permute remaining nodes and form BST ryt? 0 votes 0 votes Gupta731 commented Jan 1, 2019 reply Follow Share yeah sorry, now edited 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes Answer : 5 Only this combinations are possible. mehulshankhapal answered Dec 27, 2019 mehulshankhapal comment Share Follow See all 0 reply Please log in or register to add a comment.