Saturday, 26 August 2017

What is Data Structure?

A data structure is a specialized format for organizing and storing data. It is a way in which data is efficiently stored, processed and retrieved from the computer's memory. It helps to understand the relationship between different elements and how they are organized in a memory. Any data structure is designed to organize data to suit a specific purpose so that it can be accessed and worked with in appropriate ways.

There are numerous types of data structures

Simple Data Structure

These are normally built from primitive data types like integers, real, character, Boolean.
There are following two types of simple data structures
  1. Array
  2. Structure

Compounded Data Structure

Simple data structures can be combined in various ways to form more complex structures called compound data structures.
They are classified into the following two types:

1. Linear data structure

A data structure is said to be linear if its elements form a sequence. The elements of linear data structure represent by means of sequential memory locations.
There are the following types:
  • Stack
  • Queue
  • Linked List

2. Non-linear data structure

A data structure is said to be non-linear if its elements a hierarchical relationship between elements such as trees and graphs. All elements assign the memory as random form and you can fetch data elements through random access process.
Example of non-linear data structure is Tree.


Need of data structure:


  • The data structure is used to establish the relationship between data items.
  • It describes the logical and mathematical order for organizing the data.
  • It describes the memory allocation of the data and performs various quantitative analysis.

No comments:

Post a Comment