Skip to content
SparkTime, home

Tagged #graphs

GuideTechnology

24 min read

Shortest Paths and Topological Sorting

When BFS is enough and when it is not, Dijkstra's algorithm with a priority queue and its non-negative-weight limit, a glance at Bellman-Ford, and topological sorting with Kahn's algorithm and DFS for dependency order, including how to detect impossible orders.

GuideTechnology

24 min read

Graphs: Representations, BFS, and DFS

Vertices and edges, adjacency lists versus matrices, breadth-first and depth-first search, connected components, grids as graphs, and basic cycle detection in undirected and directed graphs, with complexity in terms of V and E.