From a23cb6d6f011950b11789898c10e63f4473a5200 Mon Sep 17 00:00:00 2001 From: Mikkel Thestrup Date: Sun, 30 Nov 2025 14:24:52 +0100 Subject: Updated every file and function to follow style guide --- src/cycle_detection.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/cycle_detection.h (limited to 'src/cycle_detection.h') diff --git a/src/cycle_detection.h b/src/cycle_detection.h new file mode 100644 index 0000000..df9607e --- /dev/null +++ b/src/cycle_detection.h @@ -0,0 +1,13 @@ +#ifndef CYCLE_DETECTION_H +#define CYCLE_DETECTION_H + +#include "graph.h" + +// Runs Kahn's algorithm on the graph, and outputs 'CYCLE DETECTED!\n' +// if a DAG cannot be created, or the vertices as a list fx. '4, 0, 1, 3, 2\n' +// representing an ordering in the DAG. +// The output is printed to stdout. +// The input may be altered in the process. +void cycle_detection(Graph *g); + +#endif // CYCLE_DETECTION_H -- cgit v1.2.3-70-g09d2