public void EnQueue(int key)
Node node = new Node(key);
public void RemoveQueue()
public static void Main()
static void BFS(int[, ] edge, int n, int x, int y)
bool[] visited = new bool[n];
Queue queue = new Queue();
int[] previous = new int[n];
for (int i = 0; i < n; i++)
for (int j = 0; j < n; j++)
if (i != j && edge[i, j] != Int32.MaxValue && !visited[j])
while (!queue.IsEmpty());
MessageBox.Show("Không tìm thấy");
static void DrawPath(int[] previous, int x)
while (previous[x] != -1)
DrawLine(previous[x], x);
static void DrawLine(int x,int y)