Graph

A graph is non-linear data structure consists of two components, A first with a finite set of vertices or nodes, and the second with a set of unordered pairs of these vertices for an undirected graph known as edges, arcs, or lines or a set of ordered pairs for a directed graph known as arrows, directed edges, directed arcs, or directed lines.

What is Data Structures

Data Structure is a particular way of storing and organizing data in a computer so that it can be used efficiently.

Depending on the organization of the elements, data structures are classified into two types:

  1. Linear data structure: Elements are accessed in a sequential order but it is not compulsory to store all elements sequentially.
  2. Non-linear data structure: Elements of this data structure are stored/accessed in non-linear order.

 

Types of Data Structures

  • Arrays
  • Sorting
  • Linked List
  • Stack
  • Queue
  • Tree
  • Graph
  • Hashing
  • Heap

  • Arrays
  • Sorting
  • Linked List
  • Stack
  • Queue
  • Tree
    • Binary Tree
    • Binary Search Tree (BST)
    • Balanced Binary Tree
  • Graph
  • Hashing
  • Heap