You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried your bfs.lua code (it is high on google search for "bfs lua"). however, I'm not sure if it is entirely correct. While your test gives the expected result when the starting node is 1, just using a random other starting node doesn't give me the expected results:
Replacing 1 by 7 in your test case, I get this output 7, 4, 11, 12, 7, 8, 7, 7, 11, 12, 11, 12, 11, 12
Nodes missing (anything smaller than 7 it seems), many being duplicated; pretty sure this is not correct.
The text was updated successfully, but these errors were encountered:
I tried your bfs.lua code (it is high on google search for "bfs lua"). however, I'm not sure if it is entirely correct. While your test gives the expected result when the starting node is 1, just using a random other starting node doesn't give me the expected results:
Replacing 1 by 7 in your test case, I get this output
7, 4, 11, 12, 7, 8, 7, 7, 11, 12, 11, 12, 11, 12
Nodes missing (anything smaller than 7 it seems), many being duplicated; pretty sure this is not correct.
The text was updated successfully, but these errors were encountered: