Topological Sort is a common pattern in coding interview questions. In this video I describe the algorithm for finding a valid topological sorting given a graph as well as the space and time complexity. I also write the code in python and explain it step by step.
p.s. I made a small typo at the end it should be if len(output) != vertices
This is my first video so any advice is appreciated!
Code: https://github.com/davearch/coding-patterns/blob/master/topologicalSort.py
https://www.darchuletajr.com/
https://www.linkedin.com/in/darchuletajr/
Download
0 formats
No download links available.
Coding Interview Patterns: Topological Sort in Python | NatokHD