Data Structures & AlgorithmsHardICPC regional · graph theory

Problem: Which algorithm constructs an Euler circuit of a connected graph whose vertices all have even degree in linear time?

  1. A. Kruskal's algorithm
  2. B. Dijkstra's algorithm
  3. C. Hierholzer's algorithm
  4. D. Tarjan's SCC algorithm

Correct answer: C. Hierholzer's algorithm

Hierholzer's algorithm splices sub-circuits found by walking greedily, which runs in O(V + E).

More Coding Interview Problems questions

Exams that ask this topic