Data Structures · Question 20 · Easy

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

  1. Queue
  2. Array
  3. Tree
  4. Stack
Answer and explanation

Answer: C. Tree

Explanation: Arrays, stacks and queues arrange elements in a single sequence. A tree is hierarchical, where one node can have several children, so it is non-linear.

Previous: A tree data structure has 25 nodes. How many edges does it have? · Next: The keys 45, 20, 60, 10, 30, 25, 50 are inserted in that order into an empty…

Practise data structures

Try a fresh set of data structures questions with an explanation after every answer, free and without signing up: Data Structures practice. Or sit a full placement mock test.

More data structures questions

More technical & programming practice

Algorithms · Object-Oriented Programming · DBMS · SQL · Operating Systems · Computer Networks · Software Engineering · Cloud & DevOps

LogicWiz Exams home · All practice topics · Placement mock tests · Daily 10 challenge