Course Hive
Search

Welcome

Sign in or create your account

Continue with Google
or
DSA in Python - Shortest Path in Directed Weighted Graph (DAG) | Topological Sort | GFG | Part 143
Play lesson

Data Structures and Algorithms with Python | Free DSA with Python Course - DSA in Python - Shortest Path in Directed Weighted Graph (DAG) | Topological Sort | GFG | Part 143

5.0 (2)
23 learners

What you'll learn

This course includes

  • 73.5 hours of video
  • Certificate of completion
  • Access on mobile and TV

Summary

Full Transcript

🚀 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

Course Hive

Continue this lesson in the app

Install CourseHive on Android or iOS to keep learning while you move.

Related Courses

FAQs

Course Hive
Download CourseHive
Keep learning anywhere