Udemy
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Graph Data Structures and Algorithms with Python
Highest Rated
Rating: 4.7 out of 5(61 ratings)
166 students

Graph Data Structures and Algorithms with Python

Graphs-Non Linear data structures
Last updated 11/2025
Korean

What you'll learn

  • Implement the Graph structure and use it whenever deemed necessary for providing better solution
  • Understand the Concept of Graphs
  • Define and explain the fundamental terminology of graphs (vertices, edges, degree, adjacency, paths, cycles, connected components).
  • Implement and analyze shortest path algorithms such as Dijkstra’s
  • Understand Minimum Spanning Tree (MST) algorithms such as Prim’s and Kruskal’s
  • Use Topological Sorting for Directed Acyclic Graphs (DAGs)

Course content

7 sections • 18 lectures • 1h 12m total length
  • Understand the Concept of Graphs0:59

    Graphs are fundamental data structures in various computer science applications, including network design, social network analysis, and route planning. Understanding graph terminology is crucial for effectively navigating and manipulating graph data structures. In this article, we will discuss the graph terminology used in the data structure.

  • Define and explain the fundamental terminology of graphs7:35

    Graph (G): A non-linear data structure consisting of a set of vertices (nodes) and a set of edges connecting these vertices. Represented as G = (V, E), where V is the set of vertices and E is the set of edges.

    • Vertex (Node): A fundamental unit in a graph, representing an entity or object.

    • Edge: A connection between two vertices. Edges can be either directed or undirected.

      • Directed Edge: An edge with a specific direction, indicating a one-way connection from a source vertex to a destination vertex.

      • Undirected Edge: An edge without a specific direction, representing a bidirectional connection between two vertices.

    • Degree of a Vertex: The number of edges incident to a vertex.

      • In-degree (Directed Graph): The number of incoming edges to a vertex.

      • Out-degree (Directed Graph): The number of outgoing edges from a vertex.

    • Path: A sequence of vertices where each adjacent pair is connected by an edge.

    • Cycle: A path that starts and ends at the same vertex, with all other vertices in the path distinct.

    • Connected Graph: A graph where there is a path between every pair of vertices.

    • Disconnected Graph: A graph that is not connected; it can be divided into two or more connected components.

    • Connected Component: A subgraph in which any two vertices are connected to each other by paths, and which is connected to no additional vertices in the supergraph.

    • Adjacency: Two vertices are adjacent if they are connected by an edge.

    • Incident: An edge is incident to a vertex if the vertex is one of the endpoints of the edge.

    • Subgraph: A graph formed by a subset of the vertices and edges of a larger graph.

    • Spanning Tree: A subgraph of a connected, undirected graph that is a tree and includes all the vertices of the original graph.

    • Forest: A collection of disjoint trees.

  • Differentiate between types of graphs0:29
  • Understanding of graphs
  • Graph Representations0:16

    Two most common ways to represent a graph : For simplicity, we are going to consider only unweighted graphs

    1. Adjacency Matrix

    2. Adjacency List

    Adjacency Matrix Representation

    An adjacency matrix is a way of representing a graph as a boolean matrix of (0's and 1's).

    Let's assume there are n vertices in the graph So, create a 2D matrix adjMat[n][n] having dimension n x n.

    • If there is an edge from vertex i to j, mark adjMat[i][j] as 1.

    • If there is no edge from vertex i to j, mark adjMat[i][j] as 0.


    Adjacency List Representation

    An array of Lists is used to store edges between two vertices. The size of array is equal to the number of vertices (i.e, n). Each index in this array represents a specific vertex in the graph. The entry at the index i of the array contains a linked list containing the vertices that are adjacent to vertex i. Let's assume there are n vertices in the graph So, create an array of list of size n as adjList[n].

    • adjList[0] will have all the nodes which are connected (neighbour) to vertex 0.

    • adjList[1] will have all the nodes which are connected (neighbour) to vertex 1 and so on.

Requirements

  • C programming Basics

Description

The Graph Data Structures and Algorithms course provides an in-depth understanding of how graphs are used to represent and solve real-world computational problems. Students will explore the fundamental concepts of graphs, including vertices, edges, degrees, adjacency, and connectivity, and will learn to differentiate between various types of graphs such as directed, undirected, weighted, and unweighted. The course emphasizes practical learning through the implementation of key graph algorithms, including traversal techniques (BFS, DFS), shortest path algorithms (Dijkstra’s, Bellman-Ford, Floyd-Warshall), and optimization algorithms (Prim’s and Kruskal’s for Minimum Spanning Trees). Learners will also study topological sorting, connectivity analysis, and real-world applications in network design, data analysis, and cybersecurity. By the end of the course, students will be able to model complex systems using graphs, select appropriate algorithms for given problems, and analyze their performance in terms of time and space complexity.

Who this course is for:

  • Undergraduate Students
  • Researchers and Enthusiasts in Computer Networks or Cyber Security
  • Postgraduate Students
  • Competitive Programmers and Software Developers