Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions BfsJava
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ class Solution

while (!q.isEmpty())
{
Integer node = q.poll();
int node = q.poll();
bfs.add(node);

// Get all adjacent vertices of the dequeued vertex s
// If a adjacent has not been visited, then mark it
// visited and enqueue it
for(Integer it: adj.get(node)) {
for(int it: adj.get(node)) {
if(vis[it] == false) {
vis[it] = true;
q.add(it);
Expand Down