STEM Interactive Visual Learning Program at TEC-Bridge AI
List Representation of a graph uses lists (arrays, linked lists, etc.) to store the neighbors of each node.
Key Characteristics:
| Operation | Time Complexity | Space Complexity |
|---|---|---|
| Add Node | O(1) | O(V+E) |
| Add Edge | O(1) | O(1) |
| Remove Node | O(E) | O(V+E) |
| Remove Edge | O(1) | O(1) |
| Show Adjacency List | O(V+E) | O(V+E) |
Strengths:
Limitations: