filmov
tv
Graph Data Structure | Illustrated Data Structures
Показать описание
A graph is a set of vertices connected to each other through edges. In this video, we learn everything you need to know about Graph Data Structure. After watching this video, you will be able to answer the following questions:
- What is graph data structure?
- What is the difference between directed and undirected graphs?
- What is a path in a graph data structure?
- What is a closed path in a graph data structure?
- What is a simple path in a graph data structure?
- What is a loop in graph data structure?
- What is the degree of a node?
- How to calculate the degree of a node in the directed graph?
- How to calculate the degree of a node in an undirected graph?
- What is a cycle graph?
- What is a connected graph?
- What is a disconnected graph?
- What is a complete graph?
- What is a weighted graph?
- What is a simple graph?
- How to represent a graph using an adjacency matrix?
- How to represent a graph using an adjacency list?
- What are the use cases of graph data structure?
Given below is the list of points you should keep in mind while picking up the programmatic representation of a graph:
Adjacency Matrix:
- Removal of an edge can be done in a constant time.
- Addition of an edge can be done in a constant time.
- Edges can be queried in constant time O(1)
- Removal of vertex has quadratic complexity O(n²)
- Addition of vertex has quadratic complexity O(n²)
- Space complexity is quadratic O(n²)
Adjacency List:
- Space complexity is linear O(n)
- Adding a vertex takes constant time O(1)
- Adding an edge takes constant time O(1)
- Removing a vertex takes linear time O(n)
- Removing an edge takes linear time O(n)
- Querying is linear O(n)
Sections:
0:00 What is Graph
01:08 Directed vs Undirected Graphs
02:54 Graph Terminology
04:50 Calculating Degree of a Node
08:47 Adjacency Matrix
11:16 Adjacency List
12:48 Use-cases of Graphs
Channel website:
Discord Community:
Find us on the internet:
- What is graph data structure?
- What is the difference between directed and undirected graphs?
- What is a path in a graph data structure?
- What is a closed path in a graph data structure?
- What is a simple path in a graph data structure?
- What is a loop in graph data structure?
- What is the degree of a node?
- How to calculate the degree of a node in the directed graph?
- How to calculate the degree of a node in an undirected graph?
- What is a cycle graph?
- What is a connected graph?
- What is a disconnected graph?
- What is a complete graph?
- What is a weighted graph?
- What is a simple graph?
- How to represent a graph using an adjacency matrix?
- How to represent a graph using an adjacency list?
- What are the use cases of graph data structure?
Given below is the list of points you should keep in mind while picking up the programmatic representation of a graph:
Adjacency Matrix:
- Removal of an edge can be done in a constant time.
- Addition of an edge can be done in a constant time.
- Edges can be queried in constant time O(1)
- Removal of vertex has quadratic complexity O(n²)
- Addition of vertex has quadratic complexity O(n²)
- Space complexity is quadratic O(n²)
Adjacency List:
- Space complexity is linear O(n)
- Adding a vertex takes constant time O(1)
- Adding an edge takes constant time O(1)
- Removing a vertex takes linear time O(n)
- Removing an edge takes linear time O(n)
- Querying is linear O(n)
Sections:
0:00 What is Graph
01:08 Directed vs Undirected Graphs
02:54 Graph Terminology
04:50 Calculating Degree of a Node
08:47 Adjacency Matrix
11:16 Adjacency List
12:48 Use-cases of Graphs
Channel website:
Discord Community:
Find us on the internet:
Комментарии