Data structures (with python) - 2. Graph - 2.4. Graph Representation
Data structures (with python) - 2. Graph - 2.4. Graph Representation 💡 A graph can either be represented as an adjacency matrix or an adjacency list. The adjacency matrix is a 2D array of size V x V where V is the number of vertices in a graph. Let the 2D array be adj[][], a slot adj[i][j] = 1 indicates that there is an edge from vertex i to vertex j. Adjacency list is an array of vectors. Size ..
2024.01.04