0 votes 0 votes to find the maximum elements in a min heap represnted by an array can be computed in ____________ time a. theta n b.theta n2 c.theta nlogn d.theta 1 DS data-structures binary-heap time-complexity + – akankshadewangan24 asked Dec 2, 2017 • recategorized Jul 6, 2022 by Lakshman Bhaiya akankshadewangan24 314 views answer comment Share Follow See all 2 Comments See all 2 2 Comments reply Anu007 commented Dec 2, 2017 reply Follow Share theta (n) . 0 votes 0 votes Harin Joshi commented Dec 2, 2017 reply Follow Share It is theta(n) 0 votes 0 votes Please log in or register to add a comment.
1 votes 1 votes In a min-heap, the largest element will be present in one of the leaves of the heap. Since there can be n/2 leaves, we need to perform a search in those n/2 leaves, the search will have to be linear. So, the best we can get is $\theta (n)$ Rishabh Gupta 2 answered Dec 2, 2017 Rishabh Gupta 2 comment Share Follow See all 0 reply Please log in or register to add a comment.