Operations on data structure | DSA

Operations on data structure

Operations on data structure:

  • Searching 
  • Sorting 
  • Insertion
  • Deletion
  • Traversing
  • Merging

Basic operations that can be performed on data structure are mentioned above now let discuss one by one.

1. Searching:

Searching operations on data structure involves searching for the specified data element in the data structure by using linear search and binary search methods, Linear search and Binary search are the methods for searching elements in the data structure.
Searching is an operation that finds the place of a given element in the list, The search is set to be successful or unsuccessful depending upon whether the element i.e being search is found or not.

2. Sorting:

Sorting operation on the data structure is arranging the data elements of a data structure in a specified order is called sorting. We can sort the elements of data structure using ascending and descending order.
There are some methods of Sorting Operations:
  • Bubble Sort
  • Selection Sort
  • Insertion Sort
  • Quick Sort
  • Radix Sort

3. Insertion:

Insertion operation on the data structure is adding a new element in the data structure. or in a simple way, it is an operation of adding new elements in the data structure.

4. Deletion:

Deletion operation on the data structure is removing an element from the data structure. Deletion operation is used to remove elements from a given collection of data items. Deletion means the removal of a data element from a data structure if it is found.

5. Traversing:

It is used to access each data item exactly once so that it can be processed. Traversal Operation on the data structure traverses all the data elements in the data structure. or processing all data elements in the data structure.

6. Merging:

Merging operation on the data structure is combining elements of two similar data structures to form a new data structure of the same type, which is called merging. It is used to combine the data items of two sorted files into a single file in the sorted form.