853 views
0 votes
0 votes

What is the criteria for distinguishing data structure in terms of linear and non-linear ?

I am bit confused with the criteria for this. I have search and tried to clear this confusion but then i got more confused since few places it is categorizing on the basis of storage in the memory and some place it is on the basis of traversal.

2 Answers

0 votes
0 votes

Linear data structures organize their data elements in a linear fashion, where data elements are attached one after the other and are traversed one after the other. Ex : Linked List

In nonlinear data structures, data elements are not organized in a sequential fashion and all the data items cannot be traversed in a single run. Ex : Tree

0 votes
0 votes

Main difference between linear and nonlinear data structures lie in the way they organize data elements. In linear data structures, data elements are organized sequentially and therefore they are easy to implement in the computer’s memory. In nonlinear data structures, a data element can be attached to several other data elements to represent specific relationships that exist among them. Due to this nonlinear structure, they might be difficult to be implemented in computer’s linear memory compared to implementing linear data structures.

Related questions

0 votes
0 votes
0 answers
1
Rohit Gupta 8 asked Oct 27, 2017
1,014 views
Most efficient data structure to implement Sets of Integer and what is the complexity of operationinsert(int e),delete(int e),isMember(int e) : returns TRUE if member oth...
0 votes
0 votes
1 answer
2
LavTheRawkstar asked Apr 4, 2017
11,864 views
What is fragmentation in terms of networking?The difference between Transparent and non transparent fragmentation is ?
2 votes
2 votes
1 answer
3
radha gogia asked Dec 10, 2015
1,602 views
If I have n elements in the heap then why does the index of leaf nodes ranges from index ⌊n/2⌋+1 to index n ?