Cycle detection in graphs does not have to be hard: A lesser known, simple way with Kahn's algorithm
Explains how to use Kahn's algorithm for topological sorting to detect cycles in graphs, with a practical example of managing employee hierarchies.
Philippe Gaultier is a software engineer and technical writer specializing in Go and C++. He focuses on debugging, concurrency, DTrace, and identifying subtle bugs and performance issues in complex applications.
45 articles from this blog
Explains how to use Kahn's algorithm for topological sorting to detect cycles in graphs, with a practical example of managing employee hierarchies.
A tutorial on writing a minimal GUI window using x86-64 assembly and the X11 protocol, resulting in a binary under 1 KiB.
A DevOps engineer shares practical strategies and tips for optimizing and speeding up Continuous Integration (CI) pipelines.
A technical guide for compiling LLVM, Clang, LLD, and the Zig programming language from source on Alpine Linux.
A tutorial on learning the Scheme programming language by solving the Advent of Code 2018 Day 5 challenge, focusing on iterative REPL use and pattern matching.