A Data Structure is a particular way of organizing data in a computer so that it can be used effectively. That means a data structure is a structural relationship of elementary data items for storing and retrieving data in a computer’s memory. For example, we can store a list of items having the same data type using the array data structure.
Examples of Data Structure : Array,Pointer,Structure,Linked List,Stack,Queue,Graph,Searching ,Sorting, Programs etc.
Operations on Data Structure :
The basic operations that are performed on data structures are as follows :
- Insertion: Insertions mean the addition of a new data element in a data structure.
- Deletions: Deletion means the removal of a data element from a data structure if it is found.
- Searching: Searching involves searching for the specific data element from the data structure.
- Traversal: Traversal of a data structure means processing all the data elements in a data structure.
- Sorting: Arranging data in a specific way.
- Merging: Combining elements of two similar data structures to form a new data structure of the same is called merging.
Advantage and Disadvantage of various Data Structure :
|Array||Quick Inserts,First access if index known||Slow Search,Slow delete,Fixed Size|
|Link List||Quick Insert , Quick Delete||Slow Search|
|Stack||LIFO(last in first access)||Slow access to other items|
|Queue||FIFO(first in first out access)||Slow access to other items|
|Binary Tree||Quick Insert,Quick search,Quick deletes||Deletion algorithm is complex|
|Graph||First Insertion and Deletions||Slow access to other items|140