Toggle Home compiler design algorithms data structure operating system software engineering C java OOP Technology Trends

Definition

Is a way to storing and organizing data into a memory so that it can be used very efficiently.

Types of data structures: 

  1. Primitive data structure

  2. Non-primitive data structure

1. Primitive data structure

A primitive data structures can hold a single value.

Example:

  1. int

  2. char

  3. float

  4. double

  5. pointer

Non-primitive data structure:

  1. Linear data structure

  2. Non-linear data structure

Linear data structure

The arrangement of data in a sequential manner is known as a linear data structure.

Example:

  1. Arrays

  2. Linked list

  3. Stacks

  4. Queues

Non-linear data structure

When one element is connected to the one or more than one elements known as a non-linear data structure. In non-linear data structures the elements are arranged in a random manner.

Example:

  1. Trees

  2. Graphs

Data structures can also be classified as:

  1. Static data structure: The size is allocated at the compile time. Means maximum fixed size

  2. Dynamic data structure: The size is allocated at the run time. Means size is flexible (We can create size as per our requirement)