Tag: graphs
An ordering of nodes in a directed acyclic graph (DAG) such that for every directed edge u→v, node u appears before v in the ordering.
6mo ago
Algorithms intermediate
Adjacency Matrix vs Adjacency List
1
Two ways to represent a graph — adjacency matrix (2D array, O(1) edge lookup, O(V²) space) vs adjacency list (array of lists, O(V+E) space, better for sparse graphs).
6mo ago
Data Structures intermediate
Graphs
3
A collection of nodes (vertices) connected by edges — directed or undirected, weighted or unweighted. The most general data structure, modelling networks, dependencies, and relationships.
6mo ago
Data Structures intermediate