Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while (q->head != NULL)
- {
- int v = frontQueue(q);
- popQueue(q);
- if(v == end)
- break;
- visitedarray[v] = 1;
- for (int i = 1; i <= n; i++)
- {
- if (map[v][i] && !visitedarray[i])
- pushQueue(i);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment