Which of the following principle does tree use?

By: Prof. Dr. Fazal Rehman Shamil | Last updated: February 3, 2024

Which of the following principle does tree use?

(A). hierarchical data structure

(B). FIFO only

(C). Linear data structure

(D). None of these

Question’s Answer: hierarchical data structure

FIFO means first element added to the queue is the first one to be removed from queue.

Data StructurePrinciple
Linked Listlinear data structure without an inherent ordering principle
Arraylinear data structure without an inherent ordering principle
StackLIFO
QueueFIFO
Treehierarchical data structure without an inherent ordering principle

Example

Output

Binary tree elements: 4 2 5 1 6 3 7