1 votes 1 votes The smallest element that can be found in time ____ in a binary max heap. $O(n \log n)$ $O( \log n)$ $O(n)$ $O(n^2)$ DS nielit-2018 data-structures binary-heap + – Arjun asked Dec 7, 2018 recategorized Oct 24, 2020 by Krithiga2101 Arjun 1.3k views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
3 votes 3 votes We need to traverse all nodes in order to identify smallest element because it is not following binary search tree properties. Searching time for ‘n’ elements will take O(n) in worst case. topper98 answered Mar 18, 2020 topper98 comment Share Follow See all 0 reply Please log in or register to add a comment.
2 votes 2 votes THE SMALLEST ELEMENT IS AT THE LEAF LEVEL IN BINARY MAX HEAP,WHICH HAS ROUGHLY N/2 ELEMENTS. SO WE NEED TO TRAVERSE ALL THESE ELEMENTS. THEREFORE CORRECT ANSWER IS OPTION C. Asim Siddiqui 4 answered Feb 16, 2019 edited Feb 16, 2019 by Asim Siddiqui 4 Asim Siddiqui 4 comment Share Follow See all 0 reply Please log in or register to add a comment.
1 votes 1 votes We can convert the Max heap into the Min heap, using build heap method which would take O(n) time and then take root element in O(1), which is the minimum. surabhi10 answered Nov 2, 2020 surabhi10 comment Share Follow See all 0 reply Please log in or register to add a comment.