From a998d2c2cf75e18ab37055fd4d503401f37b5016 Mon Sep 17 00:00:00 2001 From: Ritesh Khadse Date: Sat, 3 Jul 2021 14:57:30 +0530 Subject: [PATCH] fixed line 20 by mistake in the code it was adj.get(u) but instead it should be adj.get(node) --- shortestPathUndirectedUnweightedGraphJava | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shortestPathUndirectedUnweightedGraphJava b/shortestPathUndirectedUnweightedGraphJava index 9daa56e..ab6996c 100644 --- a/shortestPathUndirectedUnweightedGraphJava +++ b/shortestPathUndirectedUnweightedGraphJava @@ -17,7 +17,7 @@ { int node = q.poll(); - for(int it:adj.get(u)){ + for(int it:adj.get(node)){ if(dist[node] + 1 < dist[it]){ dist[it] = dist[node] + 1; q.add(it);