Skills101
← All practice quizzes

Quiz: Graph Theory Workshop

5 questions · new set on every retakeNo time limitPass: 60%+10 XP on first pass

Solved graph theory problems for exams and interviews. Test degree sequences with Havel–Hakimi, actually find an Euler path with Hierholzer's algorithm, use the Dirac and Ore tests for Hamiltonian cycles (and see where they stop working), and prove graphs non-planar with edge-count bounds — every example computed in Python.

Log in to take the quiz

Free account · see your score, answers and explanations, earn XP

  1. Question 1

    Which degree sequence is graphical (some simple graph has it)?

  2. Question 2

    What does this print?

    seq = [3, 3, 2, 2, 2]
    d = seq.pop(0)
    for i in range(d):
        seq[i] -= 1
    print(sorted(seq, reverse=True))
    
  3. Question 3

    How many edges does a 4-regular graph on 9 vertices have?

  4. Question 4

    In the house figure, the Euler path must start at:

  5. Question 5

    What is the time complexity of Hierholzer's algorithm?

🎯 Today’s placement challenge — 10 questions, no login. Can you score 10/10?Take today’s challenge →