In an array-based implementation of a heap, the parent of the node in items[i] is always stored in ______.

a. items[i/2]
b. items[(i-1)/2]
c. items[i-2]
d. items[(i-2)/2]

b. items[(i-1)/2]

Computer Science & Information Technology

You might also like to view...

A PowerPoint tool that lists information in a presentation that you might want to remove before making the presentation public is the ________

Fill in the blank(s) with correct word

Computer Science & Information Technology

Which of the following methods includes or embeds a new node directly ahead of a child node?

A. node.insert(new, old) B. node.insertBefore(new, child) C. node.replaceChild(new, old) D. node.appendChild(new)

Computer Science & Information Technology