In computer science, Heap refers to which of the following?
- A. A linear data structure that follows the First-In-First-Out (FIFO) principle.
- B. A linked list where each node has pointers to both the next and previous nodes.
- C. A structure that stores elements in contiguous memory locations, allowing constant-time indexed access.
- D. A tree-based structure that satisfies the heap property, often used to implement priority queues. ✓
Correct answer
D. A tree-based structure that satisfies the heap property, often used to implement priority queues.
Explanation
Heap refers to a tree-based structure that satisfies the heap property, often used to implement priority queues.