An array-based heap is best used to represent

2019

An array-based heap is best used to represent

  1. A.

    A general tree

  2. B.

    A full binary tree

  3. C.

    A complete binary tree

  4. D.

    A binary search tree

Attempted by 63 students.

Show answer & explanation

Correct answer: C

A heap stored in an array is best represented as a complete binary tree, because complete-tree positions map naturally to array indices.

Explore the full course: Coding For Placement