0 votes 0 votes Consider the process of inserting an element into a Max Heap, where the Max Heap is represented by an array. Suppose we perform a binary search on the path from the new leaf to the root to find the position for the newly inserted element, the number of comparisons performed is: θ(log2n) θ(log2 log2n) θ(n) θ(n log2n) DS data-structures binary-heap time-complexity gradeup-test-series + – sim1234 asked Dec 14, 2018 • recategorized Jul 7, 2022 by Lakshman Bhaiya sim1234 494 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes i think total number of elements from root to leaf is O(logn) and if we apply binary search then we can from new leaf to root then we can find position in O(loglog(n)) time so answer should be b Navneet Kalra answered Dec 14, 2018 Navneet Kalra comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes it is may be O(n) gorya506 answered Aug 18, 2019 gorya506 comment Share Follow See all 0 reply Please log in or register to add a comment.