Загрузка...

Graph Representation

In this video, we learn the two most important ways to represent a Graph in memory:

🔵 Adjacency Matrix
🟢 Adjacency List

Understanding graph representation is essential before coding graph algorithms like BFS, DFS, and shortest path.

In this lecture you will learn:

🔵 Adjacency Matrix

• What is an adjacency matrix?
• How graphs are stored using a 2D array
• Rule of representation (1 = edge exists, 0 = no edge)
• Simple and easy way to check connections between vertices

🟢 Adjacency List

• Why adjacency list is memory efficient
• How neighbours of each vertex are stored
• The concept of 2-level storage
 Array → to store vertices
 Linked List → to store neighbours
• Why adjacency list = Array + Linked List

This video builds the foundation required for coding graphs in Data Structures.

👉 Key takeaway:
Adjacency Matrix → Table representation
Adjacency List → Array + Linked List representation

Perfect for beginners, exam preparation, and DSA interviews.

Видео Graph Representation канала Turing Machine
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять