1 votes 1 votes Consider the array A=<4, 1, 3, 2, 16, 9, 10, 14, 8, 7>. After building heap from the array A, the depth of the heap and the right child of max-heap are ______ and _____ respectively (Root is at level 0). 3, 14 3, 10 4, 14 4, 10 DS ugcnetcse-july2018-paper2 data-structures binary-heap + – Pooja Khatri asked Jul 13, 2018 • recategorized May 23, 2020 Pooja Khatri 3.4k views answer comment Share Follow See 1 comment See all 1 1 comment reply sakharam commented Sep 7, 2018 reply Follow Share 16,14,10,4,7,3,9,1,8,2 is the max heap formed and height is 3, right child is 10 0 votes 0 votes Please log in or register to add a comment.
2 votes 2 votes Option (2) 3,10 Bhagyashree Mukherje answered Jul 13, 2018 Bhagyashree Mukherje comment Share Follow See all 9 Comments See all 9 9 Comments reply Show 6 previous comments rajatmyname commented Sep 23, 2018 reply Follow Share Can you please provide the resource from where you have studied that "a tree in which every node has 0 or 2 children, we consider not only the leaf nodes as the children but the internal nodes also" ? 0 votes 0 votes Bhagyashree Mukherje commented Sep 23, 2018 reply Follow Share In computer science, a binary tree is a tree data structure in which each node has at most two children, which are referred to as the left child and the right child. https://en.m.wikipedia.org/wiki/Binary_tree 0 votes 0 votes rajatmyname commented Sep 24, 2018 reply Follow Share Thanks 0 votes 0 votes Please log in or register to add a comment.
1 votes 1 votes Answer is (2). 3,10 This is max heap and right of root is 10. The depth is no. of edge from root to given node so depth is 3 Rustam Ali answered Sep 7, 2018 Rustam Ali comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes Caption option b) is correct umesh kaiwart answered Sep 25, 2019 umesh kaiwart comment Share Follow See all 0 reply Please log in or register to add a comment.