Graphs Flashcards
1
Q
What is a graph?
A
A data structure consisting of nodes/vertices and pointer edges
2
Q
What are the two forms of edges?
A
- Point in one direction (directed)
- Not specify a direction(undirected)
3
Q
How are graphs implemented?
A
- Store graphs as objects or using a dictionary (adjacency list)
- Store graphs using array (adjacency matrix)
4
Q
What are some uses of graphs?
A
- Store social network data
- Resource allocation in operating systems
- Mapping road networks for navigation systems
5
Q
How many edges can each vertex have?
A
Each vertex can have more than two edges to point to any vertex in the data structure