0

# Difference between linear n nonlinear data structures?

Updated: 8/10/2023

Wiki User

14y ago

A data structure is linear if every item is related (or attatched) to its previous and next item(e.g.array, linked list) and it is non-linear if every item is attached to many other items in specific ways to reflect relationships(e.g, n-ary tree). In linear data structure data items are arranged in a linear sequence. In non-linear data structure data items are not in a sequence.

A different Opinion (learnt while watching a video on Data Structures) is that Linear data structures are the Data structures implemented using arrays (with consecutive data allocation for each member of the array) while Non Linear Data Structure refers to an implementation in terms of use of pointers (such as a linked list).

--Research Reqd.--

Wiki User

13y ago

Wiki User

8y ago

Scalar Data Structure - Integer, Character, Boolean, Float, Double, etc. Vector or Linear Data Structure - Array, List, Queue, Stack, Priority Queue, Set, etc.Non-linear Data Structure - Tree, Table, Graph, Hash Table, etc.

Wiki User

14y ago

egs of linear data structure are stack, queue, array

egs of non linear data structure are graph and tree

one thing remember-- array is always a static data structure and link list is always a
dynamic data structure but others are dependent on array and link list,which is used.

Wiki User

12y ago

linear data structure define as it traverses the data element sequentially in which only one data element can directly be reached. for ex- array , linked list.

non linear data structure in which every data item is attached to several other data items in a way that is specific for reflecting relationships. The data items are not sequential structure. Ex: Trees, Graphs

Wiki User

14y ago

Linear DataStructures are having linear relationships in storage like stacks,queue,linked list

Non Linear DataStructures are having non linear and non sequential relationships like trees,graphs

Wiki User

8y ago

A non-linear data structure is any structure where traversal through a network of nodes may have more than one route. If we think of a linear data structure as being a row of houses along a road, we simply traverse the road to visit each house in turn.

With a non-linear structure, the road will periodically fork or branch, offering multiple routes. Whenever we traverse down one of those routes, there's always the possibility we must backtrack to that point in order to traverse the alternative routes. This means we may visit some houses more than once. However, when we're backtracking, we don't actually have to visit houses we've already visited, we simply walk past them until we reach a point where there is an alternative route that has yet to be traversed. In order to keep track of our route through a non-linear structure, we must lay down a trail of breadcrumbs. Whenever we backtrack to a point where there are one or more routes without breadcrumbs, we traverse down one of those routes.

Wiki User

8y ago

Linear data structures are ones in which the variable(s) are linked by linear equations, for example:y = c0 + c1*x1 + c2*x2 + ... + cnxn

where c0, c1, c2, ..., cn are constants and x1, x2, ..., xn are [explanatory] variables. This means that whatever the value of xk, a unit change in xk when the other xs are fixed, always results in the same change in y. In graph form, this means that the graph of y, in n dimensional space, is a straight line.

All other relationships between the x variables and y are non-linear.

Wiki User

15y ago

http://www.stat.uconn.edu/~nalini/fcilmweb/index.html go on this site