Open In App

UGC-NET | UGC-NET CS 2017 Dec 2 | Question 19

Last Updated : 13 Mar, 2018
Improve
Improve
Like Article
Like
Save
Share
Report

Consider an array representation of an n element binary heap where the elements are stored
from index 1 to index n of the array. For the element stored at index i of the array (i<=n), the index of the parent is : (A) floor ((i+1)/2)
(B) ceiling ((i+1)/2)
(C) floor (i/2)
(D) ceiling (i/2)


Answer: (D)

Explanation:

Quiz of this Question
Please comment below if you find anything wrong in the above post


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads