Linear Data Structure
Linear Data Structure
Linear data structure in "c" stored the data in a sequential. The memory location of each
element
stored can be access sequentially. The element will not be represented adjust in the
memory. However each element is attached with the next element in some way.
The possible operation on the linear structure are: -
Diversing
Insertion
Deletion
Searching
Sorting
Array [5]
Index element
0
1
2
3
4
Linked List
Stack
Stack is a data structure in which insertion and deletion operations are performed at one end
and only.
1 Next Null
Que
The data structure which allows the insertion at one end and deletion at another end is known
as que.
End at which deletion occur is known as frontend.
Que is also called first in first out.
LinkedList
LinkedList is a linear data structure. It is used to maintain a list in a memory. It is a structure
in which data are not stored in a same memory location. Each node of a list contains a
pointer. The element in LinkedList is linked by the pointer. On-Linear Data Structure Non-
linear data structure in "c" stored the data in a non-sequence manner. Data is stored in
multiple level. The implementation of non-linear data structure is more complex than linear
data structure.
Example: Tree, Graph etc.
Tree
A tree can be defined as finite nodes in data items are arranged in branches and sub-branches.
They represent graph radical relationship between various elements.
Tree consists of node connected by edges:
A root node
Edges
Root
B C D
E F
Sub tree