I really appreciate your passionable cource.
By the way, I may found a bug in BFS Graph Matrix.
As for the BFSGraphMatrix function bfs, if arguments of source and needle are same number, it returns null. But I think it should return the exact number in array.
Hi @ThePrimeagen and folks,
I really appreciate your passionable cource. By the way, I may found a bug in BFS Graph Matrix. As for the BFSGraphMatrix function bfs, if arguments of
source
andneedle
are same number, it returns null. But I think it should return the exact number in array.I mean for example,
To solve this bug, I think the code should be modified like below.
Also the test like below should be added .