Introduction to Data Structures



What is Data Structure?

Whenever we want to work with large amount of data, then organizing that data is very important. If that data is not organized effectively, it is very difficult to perform any task on that data. If it is organized effectively then any operation can be performed easily on that data.

A data structure can be defined as follows...
Data structure is a method of organizing large amount of data more efficiently so that any operation on that data becomes easy

  • Every data structure is used to organize the large amount of data
  • Every data structure follows a particular principle
  • The operations in a data structure should not violate the basic principle of that data structure.

Based on the organizing method of a data structure, data structures are divided into two types.
  1. Linear Data Structures
  2. Non - Linear Data Structures

Linear Data Structures

If a data structure is organizing the data in sequential order, then that data structure is called as Linear Data Structure.

Example

  1. Arrays
  2. List (Linked List)
  3. Stack
  4. Queue

Non - Linear Data Structures

If a data structure is organizing the data in random order, then that data structure is called as Non-Linear Data Structure.

Example

  1. Tree
  2. Graph
  3. Dictionaries
  4. Heaps
  5. Tries, Etc.,