Syed Aun
Syed Aun

Reputation: 89

List of Linear and Non-Linear Data Structures

I know the concept of linearity in data structures. But I want to know that what Data Structures are Linear and what are Non-Linear. Please show me the list of both types of data structures that we use commonly.

Upvotes: 0

Views: 3031

Answers (2)

felix95
felix95

Reputation: 1

In Linear Data Structures, data members are accessed sequentially.
Examples: Arrays, Linked Lists, Queues, Stacks, Double Linked Lists.

In Non-Linear Data Structures, a data member may have connections with several other data members; these structures follow no set sequence.
Examples: Graphs, Trees.

Upvotes: 0

TilmannZ
TilmannZ

Reputation: 1889

Here is an explanation that also gives some examples for both cases.

Linear: list, array

Non-Linear: tree, graph

Upvotes: 2

Related Questions