Efficiency of a program depends upon the choice of data structures.
Data structures are reusable.
Data structure is specified by the ADT which provides a level of abstraction.
Types Of Data Structure
Primitive Data Structure
Non-Primitive Data Structure
Linear
Static
Array
Dynamic
Linked List
Stack
Queue
Non-Linear
Tree
Graph
Data Structure Operations
1.Traversing
2.Insertion
3.Deletion
4.Searching
5.Sorting
6.Merging
- group of data elements which provides an efficient way of storing and organising data.
- Some examples of Data Structures are arrays, Linked List, Stack, Queue, etc.
Stack & Queue
Stack
What is Stack ?
Operations of Stack
Push()
pop()
peek()/top()
isEmpty()
isFull()
Insert operation is called push operation.
Delete operation is called pop operation.
Ways To Implement Stack
Static
Dynamic
Queue
What is Queue ?
Operation of Queue
enqueue()
dequeue()
Insert operation is called enqueue operation.
delete operation is called enqueue operation.
Linked List
What is Linked List ?
Why use a linked list over an array?
Types of Linked List
Singly Linked List
Operation on SLL
Insertion
Insertion at beginning
Insertion at end of list
insertion after specified node
Deletion
Deletion at beginning
Deletion at the end of list
Deletion after specified node
Traversing
Searching
Doubly Linked List
Operation On DLL
Insertion
Insertion at beginning
Insertion at end of list
insertion after specified node
Deletion
Deletion at beginning
Deletion at the end of list
Deletion after specified node
Traversing
Searching
Circular Linked List
Doubly Circular Linked List
Trees
Basic Terminologies Of Tree DS
Parent Node
Child Node
Root Node
Leaf Node or External Node
Ancestor of a Node
Descendant
Sibling
Level of a node
Internal Node
Neighbour of a Node
Subtree
Basic Properties Of Tree DS
Number Of Edges
Depth of a node
Height of a node
Height of the Tree
Degree of a Node
An edge can be defined as the connection between two nodes.
The depth of a node is defined as the length of the path from the root to that node. Each edge adds 1 unit of length to the path.
The height of a node can be defined as the length of the longest path from the node to a leaf node of the tree.
The height of a tree is the length of the longest path from the root of the tree to a leaf node of the tree.
The total count of subtrees attached to that node is called the degree of the node. The degree of a leaf node must be 0.
Basic Operation Of Tree DS
Create
Insert
Search
Pre-Order Traversal
In-Order Traversal
Post-Order Traversal
create a tree in data structure.
Inserts data in a tree.
Searches specific data in a tree to check it is present or not.
perform Traveling a tree in a pre-order manner in data structure .