Concepts8

⚙️AlgorithmIntermediate

Pigeonhole Principle Applications

The Pigeonhole Principle says if you put more items than boxes, at least one box must contain two or more items; this simple idea powers many algorithmic guarantees.

#pigeonhole principle#dirichlet principle#cycle detection+11
⚙️AlgorithmIntermediate

Functional Graph

A functional graph is a directed graph where every node has exactly one outgoing edge, so repeatedly following edges from any start eventually loops into a cycle.

#functional graph#successor graph#cycle detection+10
MathAdvanced

Pollard's Rho Factorization

Pollard's Rho is a randomized algorithm that finds a non-trivial factor of a composite integer by walking a pseudorandom sequence modulo n and extracting a factor with a gcd.

#pollard's rho#integer factorization#cycle detection+10
⚙️AlgorithmIntermediate

Strongly Connected Components

Strongly Connected Components (SCCs) partition a directed graph into maximal groups where every vertex can reach every other vertex in the group.

#strongly connected components#tarjan#kosaraju+12
⚙️AlgorithmIntermediate

DFS - Tree and Graph Properties

Depth-First Search (DFS) assigns each vertex a discovery time and a finish time that capture a neat nesting structure of recursion.

#dfs#timestamps#discovery time+11
⚙️AlgorithmIntermediate

Topological Sort

Topological sort orders the nodes of a directed acyclic graph (DAG) so every edge points from left to right in the order.

#topological sort#kahn algorithm#dfs topological order+12
⚙️AlgorithmIntermediate

Depth-First Search (DFS)

Depth-First Search (DFS) explores a graph by going as deep as possible along each path before backtracking.

#depth-first search#dfs#graph traversal+12
🗂️Data StructureIntermediate

Disjoint Set Union (Union-Find)

Disjoint Set Union (Union-Find) maintains a collection of non-overlapping sets and supports fast merging and membership queries.

#disjoint set union#union-find#path compression+11