Skip to content

Graphs -> Eulerian Path / Cycle

Degree conditions, Hierholzer traversal, and use-every-edge-once constructions in directed and undirected graphs.

  • Topic slug: graphs/eulerian-path-cycle
  • Tutorial page: Open tutorial
  • Ladder page: Open ladder
  • Repo problems currently tagged here: 1
  • Repo companion pages: 5
  • Curated external problems: 3

Microtopics

  • hierholzer
  • eulerian-trail
  • eulerian-cycle
  • degree-parity
  • indegree-outdegree-balance
  • de-bruijn-reduction

Learning Sources

Source Type
cp-algorithms Eulerian Path Reference
OI Wiki Euler graph Reference
CSES Mail Delivery Practice

Practice Sources

Source Type
CSES Problem Set Practice
CSES Teleporters Path Practice
Codeforces problemset Practice

Repo Companion Material

Material Type
Eulerian hot sheet quick reference
Eulerian starter route starter route
Mail Delivery note anchor note
Graph cheatsheet quick reference
Euler Tour / Subtree Queries tutorial compare point

Curated External Problems

Core

Problem Source Difficulty Context Style Prerequisites Tags Why it fits
Mail Delivery CSES Medium Undirected Hierholzer Traversal; Degree Check; Witness Output Undirected Graphs; Degree Parity; DFS-Style Traversal Eulerian Cycle; Hierholzer; Degree Parity; Undirected Graphs The cleanest first contest problem for undirected Eulerian cycles: parity, connected support, and one Hierholzer walk.
Teleporters Path CSES Hard Directed Directed Hierholzer; Balance Check; Start-End Enforcement Directed Graphs; Indegree And Outdegree; Eulerian Trail Conditions Eulerian Path; Directed Graphs; In-Out Balance; Hierholzer The canonical directed-path benchmark where start and end are fixed and in/out balance matters more than parity.

Classics

Problem Source Difficulty Context Style Prerequisites Tags Why it fits
Play on Words UVa Medium Classic Modeling; Balance Check; Connected Support Directed Graphs; Eulerian Path Conditions; Graph Modeling String To Graph; Directed Eulerian Path A classic Eulerian-reduction problem where statement parsing and graph support checks matter as much as the traversal itself.

Repo Problems

Code Title Fit Difficulty Pattern Note Solution
MAILDELIVERY Mail Delivery primary medium - Note Code

Regeneration

python3 scripts/generate_problem_catalog.py