Loading, please wait...

A to Z Full Forms and Acronyms

What are the different types of Data Structures? Data Structures Tutorial

Nov 20, 2022 #DataStructuresTutorial, 191 Views
In this article, you will learn about: What are the Characteristics of the Data Structures? What are the different types of Data Structures?

What are the different types of Data Structures? Data Structures Tutorial

In this article, you will learn about:

  • What are the Characteristics of the Data Structures?
  • What are the different types of Data Structures?

What are the Characteristics of the Data Structures?

Data Structures are divided into different categories based on their Characteristics. The following main characteristics are:

  • Linear or Non-Linear: Linear characteristic mentions whether the data items are arranged in sequential order such as an array, or unordered sequence i.e graph.
  • Homogeneous or Heterogeneous: This characteristic mentions whether all the data items in a given repository are of a similar data type. An example is a set of elements in an array, or various types, such as an abstract data type defined as a structure in C. 
  • Static or Dynamic: It describes how the data structures are compiled. Static data structures have fixed sizes, structures, and memory locations at a compile time. Dynamic data structures have sizes, structures, and memory locations that can shrink or expand, depending on the use. 

What are the different types of data structures?

The data types are the building blocks of data structures. The data structures are the building blocks of algorithms and computer programs. The primitive data types include the following:

  • Boolean: It stores the logical values that are either true or false.
  • Integer: It holds a different range of values, for example, a signed 8-bit integer holds values from -128 to 127 and unsigned long 32-bit integers hold values from 0 to 4,294,967,295.
  • Floating-point numbers: It stores the formulaic representation of real numbers.
  • Fixed-point numbers: It holds real values but is managed as digits to the left and the right of the decimal point.
  • Character: It uses symbols from a defined mapping of integer values to symbols.
  • Pointers: It points to the other values.
  • String: It is an array of characters.

Types of Data Structures

The various data structures include the following:

  • Array: An array stores a collection of items of the same type. Items are of the same data type and stored together so that the position of each element has a specific index. Arrays are of fixed length.
  • Stack: A stack stores a collection of items in linear order. It is in last in, first out (LIFO), or first in, first out (FIFO).
  • Queue: A queue stores a collection of items similar to a stack. It is in First In, First Out (FIFO).
  • Linked List: A linked list stores a set of items in a linear order. Each element, or node, in a linked list, contains data items as well as a reference of the next item in the list.
  • Tree: A tree stores a collection of items in an abstract, hierarchical way. Each node is associated with a key value, with parent nodes linked to child nodes – or subnodes. 
  • Heap: A heap is a tree-based structure in which each parent node’s associated key value is greater than or equal to the key values of any of its children’s key value
  • Graph: A graph stores a collection of items which has non-linear characteristics. Graphs are made up of a finite set of nodes also known as vertices and lines that connect the vertices are known as edges.
A to Z Full Forms and Acronyms