Skip to content

Latest commit

 

History

History

06-graph-basics

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Hoofdstuk 6: Basis grafen

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

Vereisten

Unit 6: Graph basics

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

Prerequisites

Exercise

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.