- Популярные видео
- Авто
- Видео-блоги
- ДТП, аварии
- Для маленьких
- Еда, напитки
- Животные
- Закон и право
- Знаменитости
- Игры
- Искусство
- Комедии
- Красота, мода
- Кулинария, рецепты
- Люди
- Мото
- Музыка
- Мультфильмы
- Наука, технологии
- Новости
- Образование
- Политика
- Праздники
- Приколы
- Природа
- Происшествия
- Путешествия
- Развлечения
- Ржач
- Семья
- Сериалы
- Спорт
- Стиль жизни
- ТВ передачи
- Танцы
- Технологии
- Товары
- Ужасы
- Фильмы
- Шоу-бизнес
- Юмор
DSA in Python - Shortest Path in Directed Weighted Graph (DAG) | Topological Sort | GFG | Part 143
🚀 Welcome to Part 143 of Code & Debug’s DSA in Python Course!
In this session, we tackle the problem Shortest Path in an Directed Graph (with Positive Weights) from GFG, assuming the graph is a Directed Acyclic Graph (DAG).
We solve it using Topological Sorting.
🔍 What you’ll learn:
✅ Why Dijkstra is not needed for DAGs
✅ How Topological Sort helps in shortest path
✅ Updating distances based on topo order
✅ What to do with unreachable nodes (set to -1)
✅ Time and space complexity breakdown
📄 GFG Problem Link:
https://www.geeksforgeeks.org/problems/shortest-path-in-undirected-graph/1
👉 Refer to the article for better understanding:
🔗 https://codeanddebug.in/blog/shortest-path-in-a-weighted-dag-topological-sort/
📚 Python DSA Course Playlist & Sheet:
https://docs.google.com/spreadsheets/d/1AWE15Fy3wD2iqu2vjK_R7cCiuvSsjYQclcdZmHpF66o/edit?usp=sharing
🚀 Zero to Hero Python DSA:
https://codeanddebug.in/course/zero-to-hero-python-dsa
💡 Free Masterclass with LeetCode-Based Problems:
https://codeanddebug.in/course/master-dsa-with-leetcode
💬 Have doubts? Drop them in the comments!
🔔 Don’t forget to subscribe for daily DSA content.
#TopologicalSort #ShortestPathDAG #GraphAlgorithms #PythonDSA #CodeAndDebug #Part143 #GFG #UndirectedGraph #DynamicProgramming #ZeroToHeroDSA
Видео DSA in Python - Shortest Path in Directed Weighted Graph (DAG) | Topological Sort | GFG | Part 143 канала Code and Debug
In this session, we tackle the problem Shortest Path in an Directed Graph (with Positive Weights) from GFG, assuming the graph is a Directed Acyclic Graph (DAG).
We solve it using Topological Sorting.
🔍 What you’ll learn:
✅ Why Dijkstra is not needed for DAGs
✅ How Topological Sort helps in shortest path
✅ Updating distances based on topo order
✅ What to do with unreachable nodes (set to -1)
✅ Time and space complexity breakdown
📄 GFG Problem Link:
https://www.geeksforgeeks.org/problems/shortest-path-in-undirected-graph/1
👉 Refer to the article for better understanding:
🔗 https://codeanddebug.in/blog/shortest-path-in-a-weighted-dag-topological-sort/
📚 Python DSA Course Playlist & Sheet:
https://docs.google.com/spreadsheets/d/1AWE15Fy3wD2iqu2vjK_R7cCiuvSsjYQclcdZmHpF66o/edit?usp=sharing
🚀 Zero to Hero Python DSA:
https://codeanddebug.in/course/zero-to-hero-python-dsa
💡 Free Masterclass with LeetCode-Based Problems:
https://codeanddebug.in/course/master-dsa-with-leetcode
💬 Have doubts? Drop them in the comments!
🔔 Don’t forget to subscribe for daily DSA content.
#TopologicalSort #ShortestPathDAG #GraphAlgorithms #PythonDSA #CodeAndDebug #Part143 #GFG #UndirectedGraph #DynamicProgramming #ZeroToHeroDSA
Видео DSA in Python - Shortest Path in Directed Weighted Graph (DAG) | Topological Sort | GFG | Part 143 канала Code and Debug
Комментарии отсутствуют
Информация о видео
17 июня 2025 г. 19:34:58
00:28:58
Другие видео канала




![DSA in Python - Minimum Spanning Tree Using Kruskal’s Algorithm | GFG MST | Part 159 [Hindi]](https://i.ytimg.com/vi/LdknY_dfTyo/default.jpg)
![DSA Python - Binary Tree Maximum Path Sum | Optimized DFS Approach | Leetcode 124 - Part 113 [Hindi]](https://i.ytimg.com/vi/kpEWBjT3gbI/default.jpg)
![DSA with Python - What Are Connected Components in Graphs? - Part 119 [Hindi]](https://i.ytimg.com/vi/YSROdEqf3ow/default.jpg)
![DSA with Python - Rotting Oranges | BFS Grid Traversal | Leetcode 994 - Part 122 [Hindi]](https://i.ytimg.com/vi/sBspSzNU7Oc/default.jpg)
![DSA in Python - Print the Longest Common Subsequence | Build DP Table + Backtrack | Part 209 [Hindi]](https://i.ytimg.com/vi/Qv0ZXe2L90I/default.jpg)
![DSA in Python - Implement Queue using Stack | Using Two Stacks Explained | Part 86 [Hindi]](https://i.ytimg.com/vi/1U-FKK4p6VE/default.jpg)

![DSA in Python - Partition Equal Subset Sum | 1D DP on Subsequences | LeetCode 416 | Part 203 [Hindi]](https://i.ytimg.com/vi/s57L65SYkHc/default.jpg)
![DSA in Python - Minimum Path Sum | 4 Grid DP Approaches | LeetCode 64 | Part 198 [Hindi]](https://i.ytimg.com/vi/oLGfWUt2gFY/default.jpg)
![DSA in Python - Best Time to Buy and Sell Stock IV | At-Most K Trades DP (O(n·k)) | Part 216 [Hindi]](https://i.ytimg.com/vi/JBShufRNGzw/default.jpg)

![[Live] DAY 11 - Python Doubts and more | 14+ days live classes](https://i.ytimg.com/vi/MnjFkWqiNcw/default.jpg)


![DSA in Python - Unique Paths | 4 DP Approaches | LeetCode 62 | Part 196 [Hindi]](https://i.ytimg.com/vi/dZNV9dDvo4g/default.jpg)

![DSA in Python Course - Search in a Binary Search Tree | LeetCode Easy | Part 169 [Hindi]](https://i.ytimg.com/vi/nF3EcB3grg8/default.jpg)
