What is Linear Data Structure

Errorlogger
0

Linear Data Structure:

A linear data structure traverses the data elements sequentially, in which only one data element can directly be reached. Ex: Arrays, Linked Lists 
A data structure is set to be a linear data structure. If it form a sequence or linear list can be implemented into two different way in the memory.
  1. In first way we specify the relationship between elements with the help of sequential memory location. In this data structure first element will be in the first element position. Second element will occupy the next position and so on. For example: Array
  2. In other way we specify the relationship between different elements with the help of pointer and linker. In this data structure first element hold the address of second element and so on. The elements of the data structure are not continuously saved in the memory.  For example: Link List
Arrays come under the category of linear data structure different type of operation that can be perform on the data structure.
  1. Traversing:- It is the process in which we access the each element of the array exactly once. The output of this operation can be all the elements of the array or only a selective group of the elements. Any operation can come under the category of Traversing. If we are using all the elements of the array.
  2. Insertion:- It is process in which we add a new element in the array. After the insertion operation the size of the array will increase by one. Insertion operation can be performed on a sorted as well as unsorted array. In unsorted array element will be inserted at last position an in sorted array element will be insert at specific position.
  3. Deletion:- It is the process in which we delete an element from the array. After the deletion operation the number of element in the array will decrease by one.
  4. Searching:- It is process in which we find a particular record in the array that is an element is exiting in the array or not. In search operation we find the index number of the element.
  5. Sorting:- It is process in which we arrange the element of the array in a particular order. It can be arrange in the ascending or descending order. When array can be arranged then search operation can be easily perform.
  6. Merging:- It is process in which we combine two array to create a new array. There is a one condition for the merging i.e. is the two arrays should be in the sorted form and the new array will also be in the sorted form. The size of new array is equal to the sum of two arrays (Which we are combining).

Post a Comment

0Comments

Post a Comment (0)

#buttons=(Accept !) #days=(30)

Our website uses cookies to enhance your experience. Check Now
Accept !