types of data structure
Data Structure

Types of Data Structure with Example

Types of Data Structure

Different types of data structure with example are discussed here in this tutorial.

Data Structure is one of the fundamental subject of Computer Science  and Engineering Branch. Interview Questions from Data Structure are generally asked  in every technical interview.

In this tutorial we will learn about Data Structure definition, advantages of data structure, types of data structure, graph data structure.

This tutorial will also be beneficial for the students preparing for GATE(CS/IT)/UGC NET Exam.

Let’s start with the introduction of Data Structure.

Frequently Asked Questions

Some frequently asked questions on this topic are listed here.

  • What is Data ?
  • What is difference between data and information ?
  • What do you mean by Data Structure ?
  • What are different types of data structure ?
  • Write the difference between Linear and non Linear data Structure.
  • Give 2 examples of Linear and non Linear Data Structure.
  • Write some advantages of data Structure

After reading this tutorial students can answer all these questions.

What is Data and Information ?

The characters, symbols, or quantities on which the computer can perform different kinds of operations and which can be stored or transferred in the form of electrical signals and which can be stored in different magnetic, optical, or mechanical recording media, are known as data.

If the data is arranged in a structured way such that the data appears meaningful then the data is called information. 

Hence, to produce some meaningful information from the data we need to process the data.

To find an appropriate way to structure or process the data we need to know about data structures. 

types of data structure

What is Data Structure ?

There is no rigid definition of data structure but still we can defined Data Structure. Data Structure definition is given below –

A Data Structure is a systematic way to organize or arrange or manage data in such a way that the data can be used efficiently and information can be produced from the data.

Data Structure Example

  • First and best example of data structure is Array.
  • Arrays are some sequence or collection of some symbols, characters, integers or floats, etc.
  • An Array is a data structure because it helps in organizing or managing the data in a sequential manner.
  • Storing strings is equivalent to storing a sequence of characters. 

Types of Data Structure with Example 

There are mainly two types of data structure. These are-

1.Linear Data Structure

Linear Data Structures are  the data structures in which all the data item are arranged in a linear or sequential order. Array , Stack, Queue and Linked List are example of Linear Data Structure.

Representation of different types of linear data structures is as shown in following figure.

types of data structure

2.Non-linear Data Structure

 A Data Structure is non-linear when there is no linear arrangement of the data items

For example – Tree and graph  are examples of non linear data structure.

Representation of different non linear data structures such as graph data structure is as shown in following figure.

types of data structure

If we even go further, data structures can also be divided as static and dynamic data structures.

  1. Static data structures have a limited size or the maximum size is fixed. In these data structures, the memory is allocated at compile time. For example: Arrays
  2. In Dynamic data structures memory is allocated at run time. Therefore, maximum size is flexible. For example: Linked List Data Structure

Advantages of Data Structure

Various advantages of Data Structure are given below –

Efficiency: Efficiency of a program depends upon the Data Structures used in the program.

Suppose, we have some data and we need to find a specific record stored in the  data structure then if we organize our data in an array then we will have to search data element sequentially one by one it take more time hence  using array may not be very efficient in this case.

There are better data structures which can make the search process efficient like ordered array, binary search tree or hash tables.

Reusability: Data structures can easily reuse it means once we have implemented a particular data structure then we can use it at any other place.

Implementation of data structures can be compiled into libraries which can be used by different clients.

Abstraction: Data structure is specified by the Abstract Data Type . Abstract Data Type is used to provide a level of Abstraction. End user need not to worry about the implementation of the data structure he just use the interface.

Conclusion and Summary

In this tutorial  we have explained the data structure definition and types of data structure.

Your feedback is precious to us. Please give your feedback or leave a comment to improve the quality of our tutorials and provide tutorials as per your expectation.

Do not stop learning and practice.

 Next Tutorial Array in Data Structure

  

 

Leave a Reply

Your email address will not be published. Required fields are marked *