Can your graph contain cycles? Both functions woul...
# codereview
k
Can your graph contain cycles? Both functions would get stuck in that case.