1 votes 1 votes Consider a binary tree T that has 100 leaf nodes. Then the number of INTERNAL nodes in T that have exactly two children are ______. DS data-structures binary-tree binary-search-tree + – iarnav asked Jan 7, 2018 iarnav 1.5k views answer comment Share Follow See all 2 Comments See all 2 2 Comments reply saxena0612 commented Jan 7, 2018 reply Follow Share $99$? 0 votes 0 votes Avdhesh Singh Rana commented Jan 7, 2018 reply Follow Share if the binary tree is full. 0 votes 0 votes Please log in or register to add a comment.
Best answer 3 votes 3 votes The number of INTERNAL nodes in the binary tree that have exactly two children is calculated as : number of leaf node -1. you can verify it by some eg. so for 100 node number of INTERNAL nodes that have exactly two children are 99. Hira Thakur answered Jan 7, 2018 • selected Jan 8, 2018 by iarnav Hira Thakur comment Share Follow See all 2 Comments See all 2 2 Comments reply gauravkc commented Jan 7, 2018 reply Follow Share Is it applicable to any type of binary tree? 0 votes 0 votes Hira Thakur commented Jan 8, 2018 reply Follow Share yes, it's true for all BT. 1 votes 1 votes Please log in or register to add a comment.