A program is a collection of some instructuction to perform a specific task. A data structure is a way to organized data in main memory (RAM) for efficiently use. Data structure are the ingridiant/ main component to build an algorithm. Algorithms are step by step process to solve a given problem.
Data structure is not a programming language like C , C++ , Java etc .These are the set of algorithms to apply any programming language to organised data in main memory.
There are two types of data structure
a) Primitive Data Structure
b)Non-Primitive Data Structure
Primitive Data Structure
Primitive data structure are the pre-defined data structure that primitive data types are int , char , float , double that’s are hold a single value.
Non-primitive Data Structure
Non-primitive are the used defined data structure that are user can defined by their requirement. Non-primitive data structure are divided into again two types such as:-
a) Linear Data Structure – If a data structure arranged in a Sequencial manner is known as Linear Data Structure. This type of data structure are Array , Linked list , Stack , Queue ,etc.
b)Non-Linear Data Structure – These are declared non linear type. If a single element can connected with “n” number of element to each other is knows as non-linear data structure. Exp- Graph , Tree etc.
Major Operations are Perform On Data Structure
Searching – To search an element in data structure.
Sorting – Arrange the data in a particular way that’s may be ascending or descending order.
Insertion – To add new element in data structure.
Updating – To update any new element from an exciting element or replace the element in data structure.
Deletion – To delete or remove the element in data structure.
To read More details click here
Advantage of Data Structure
Easy – data Structure is easy to use and simple.
Efficiently – Data Structure are very efficient and optimised.
Reusability: he data structures provide reusability means that multiple client programs can use the data structure.
Abstracted – it can hide the actual backend information and shows only user required information.