Data Structure is a way of collecting and organising data in such a way that we can perform operations on these data in an effective way. Data Structures is about rendering data elements in terms of some relationship, for better organization and storage.
In simple language, Data Structures are structures programmed to store ordered data, so that various operations can be performed on it easily.Data structure is a mathematical and logical model of data.
Types of Data Structure: There are two types of data structures, Linear data structure and noon linear data structure.
Linear Data Structure: Linear data structure is a data structure in which data is stored in linear fashion. Examples are array, stack, queue and linked list.
Non Linear data structure: Non Linear data structure is a data structure in which data is not stored in linear fashion. Examples are: Tree, Graph
Operations on data structure:
Traversing: Basically to process a data structure if every element of data structure is visited once and only once, such type of operation is called as traversing.
Insertion: When an element of the same type is added to an existing data structure, the operation we are doing is called as Insertion operation. The element can be added anywhere in the data structure in the data structure.
Deletion: When an element is removed from the data structure, the operation we are doing is called as Deletion operation. We can delete an element from data structure from any position.
Searching: When an element is checked for its presence in a data structure, that operation we are doing is called as ‘searching’ operation. The element that is to be searched is called as key element.
Sorting: When all the elements of array are arranged in either ascending or descending order, the operation used to do this process is called as Sorting
Merging: When two lists List A and List B of size M and N respectively, of same type of elements, clubbed or joined to produce the third list, List C of size (M+N), and the operation done during the process is called as Merging.
Introduction to Data Structure
Author: Nidhi Gupta