Practice mode Data Structures

Which of the following is a non-linear data structure?

Correct answer B. Tree

Explanation

In a linear structure each element has at most one predecessor and one successor, so the elements form a single sequence; stacks, queues and linked lists all fit this pattern. A tree is non-linear because one node can have several children, creating a branching hierarchy. Graphs are the other common non-linear structure, where any vertex may connect to many others.

Report a problem

Answer checked How we write and check questions

Tip: press A, B, C or D to answer, and N for the next question.

Advertisement

Have a question about this answer?

Your email address will not be published. Required fields are marked *

Links and website addresses are not allowed in comments.