Bounded C# Graph Traversal: Stop Cycles with a Visited Set and Node Limit
Keep C# graph traversal finite with a visited set, FIFO queue, and per-neighbor node cap. Reproduce cycle, limit, and identity checks safely.
Keep C# graph traversal finite with a visited set, FIFO queue, and per-neighbor node cap. Reproduce cycle, limit, and identity checks safely.