Dit hoofdstuk omvat de basis van grafen, samen met enkele veelgebruikte voorstellingen.
- Beginselen definities en terminologie
- Soorten grafen
- Verbindingslijst
- Aanliggendheids matrix
- Aanliggensheids lijst
- Speciale voorstellingen voor bomen
- Hoofdstuk 1: Complexiteit
This unit covers the basics of graphs and then some common representations.
- Basic definitions and vocabulary
- Types of graphs
- Edge list
- Adjacency matrix
- Adjacency list
- Special representations for trees
- Unit 1: Complexity
Starting from a hard-coded edge list, build the adjacency matrix and adjacency list of the graph. After that, implement two functions:
- given two nodes, return true if they are connected by an edge;
- given one node, print all the neighbors of the node.
You can use whichever structure you want, but time complexity must be optimal.