🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Graph Theory Workshop: all 14 questions

Quiz: Graph Theory Workshop · Question 4 of 14

What is the time complexity of Hierholzer's algorithm?

What is the time complexity of Hierholzer's algorithm?

  1. A.O(V!)
  2. B.O(2^E)
  3. C.O(E), linear in the number of edges
  4. D.O(V³)
Answer & explanation

Correct answer: O(E), linear in the number of edges

Each edge is pushed and popped a constant number of times.

Can you get the rest right without peeking?

Take the timed Quiz: Graph Theory Workshop quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →