What are the basic data structure operations and Explanation?
Data structure operations are the data that is stored in our data structures that are processed by a certain set of operations.
therefore, while selecting a particular data structure for the application then we choose a given data structure largely on the frequency with which specific operations are performed.
there are the following Data structure operations we can perform on the data structures:
Accessing each data exactly once in the data structure so that each data item in traversed or visited.
In data structure operation, traversing operation of an array, every element of an array is accessed exactly for once for processing.
it is also called the visiting of an array.
Let CB is a Linear Array (unordered) with N elements.
//Write a Program which performs traversing operation.
printf("The array elements are:\n");
printf("CB[%d] = %d \n",i,CB[i]);
The arrayelements are:
Searching: it is Finding the location of data within the data structure that satisfies the searching condition or the criteria. Inserting: Adding new data in the data structure is referred to as insertion. Deleting: in this operation Removing data from the data structure is referred to as deletion. Sorting: Arranging the data in some logical order, for example, is numerical increasing order or alphabetically. Merging: Combining the data of two different sorted files into a single sorted file.
Must follow the below-given steps while Designing data structures:
First In a particular Program, Determine the logical picture of the data.
Second, Select the representation of data.
Third, Develop those operations that will be applied to
Different Data Structures are as follows:
Simple Data structure
This type of data structure is a linear array and holds several values of the same type (Floats, Integer, String, etc.) and normally build from primitive data types like integer, real, boolean, character, Accessing elements within the array is very fast.
simple data structures are the following two types : 1. Array 2. Structure