Which of the following data structures is used for implementing a hierarchical…

2025

Which of the following data structures is used for implementing a hierarchical relationship between different elements?

  1. A.

    Stack

  2. B.

    Queue

  3. C.

    Array

  4. D.

    Tree

Attempted by 661 students.

Show answer & explanation

Correct answer: D

Trees represent hierarchical relationships between various elements or data. Each node in a tree can be connected to multiple nodes and is used to represent the non-linear data structure.

Explore the full course: Cocubes Preparation