Ask your AI Ask your AI to turn this code into a guided bug-finding exercise.
Claude ChatGPT I am reading "Which property distinguishes a rooted tree from a general directed graph?" on CodeWiki (https://codewiki.com/practice/mcq/foundations/trees-and-graphs/rooted-tree-invariant/).
Context (verbatim from the page):
"""
Which property distinguishes a rooted tree from a general directed graph?
Every non-root node has exactly one parent, and every node is reachable from the root.
Every node has at least two outgoing edges.
Every edge carries the same numeric weight.
Every node is stored in an adjacency matrix.
"""
Introduce three subtle bugs into the example above and let me find them. Reveal each answer only after I have guessed.
Answer in English. Keep code examples in CS foundations. Where you are unsure, say so.