answersLogoWhite

0


Best Answer

When we speak of linear and no-linear data structures, we are referring to the links between one element and the next. These links determine how we traverse the structure such that we "visit" every element in the structure. When every element has only one possible link to the next in sequence, then the structure is said to be linear. If any element has two or more possible links, it is said to be non-linear.

Arrays, lists, stack and queues are examples of linear structures. Trees, networks and graphs are examples of non-linear structures.

A binary tree is the simplest example of a non-linear structure because every element has, at most, two possible links, a left link and a right link. If we follow the left link, then at some point we must return to that same element in order to follow its right link. This means we must backtrack. Any structure that requires us to backtrack during a traversal is therefore non-linear.

Linear traversal is more efficient than non-linear traversal because there is no need to backtrack to traverse a linear data structure.

User Avatar

Wiki User

9y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What does non-linear data structure mean?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions