View on GitHub

advent-of-code-2024

Readable Advent of Code 2024 algorithms and solutions in C language

Day 23: LAN Party

Part A

Let $G=(V,E)$ be an undirected graph. Let $U\subseteq V$.

Algorithm:

Time complexity: $O(\lvert E\rvert^2)$.

Space complexity: $O(1)$.

Part B

Let $G=(V,E)$ be an undirected graph.

Algorithm:

Time complexity: $O\left(3^{\frac{\lvert V\rvert}{3}}\right)$.