QUESTION---- Define data structure ? Explain Needs and classification of data structures.
Data Structures and Algorithms
NEEDS OF DATA STRUCTURE--
1-- How to represent data in computers?
2-- How to access them?
3-- What are the steps we need to perform to get the needed output
These task can be achieved with the knowledge of data structure and algorithm.
CLASSIFICATION OF DATA STRUCTURE---
1-> PRIMITIVE DATA STRUCTURE
-- These are the fundamentals standards data types.
-- These are used to represent single values .
example- int, float, char, double
2-> NON-PRIMITIVE DATA STRUCTURE
-- These are derived from primitive data types
-- Used to store group of values
example- arrays, stacks, queues, trees etc.
LINEAR DATA STRUCTURE--
> A data structure is said to be linear if its elements form a sequence or a linear list
> In linear data structures, the data is arranged in a linear fashion although the way they are stored in memory need not be sequential
example- Arrays, linked list etc
NON-PRIMITIVE DATA STRUCTURE--
> A data structure is said to be a non-linear if the data is not arranged in sequence.
> The insertion and deletion of data is therefore not possible in a linear fashion
example- trees, graphs