In graph theory, breadth-first search (BFS) is a graph search algorithm that begins at the root node and explores all the neighboring nodes. Then for each of those nearest nodes, it explores their unexplored neighbor nodes, and so on, until it finds the goal.
0
votes
0answers
52 views
C++ BFS for creating a queue without repetitions and with loops in the graph
I have a Pipeline with loops of filters, i have one input filter. the rest are splitters, transform and output
I would like my code to go over the filters and push them into a queue (order is ...
1
vote
0answers
50 views
BFS implementation to find connected components taking too long
This is in continuation to a question i asked here.
Given the total number of nodes(employees) and the adjacency list(friendship amongst employees) I need to find all the connected components. Below ...
0
votes
0answers
51 views
T-SQL BFS center node of undirected graph
I am trying to answer this question by using a breadth-first search from each node of the graph represented by the tables mapSolarSystems and mapSolarSystemJumps in the data dump at ...
1
vote
3answers
328 views
Shortest path in a grid between two points. Code optimization
I have this problem where I have to find the shortest path in an NxM grid from point A (always top left) to point B (always bottom right) by only moving right or down. Sounds easy, eh? Well here's the ...
5
votes
1answer
434 views
Improve Graph Adjacency List Implementation and Operations
I am studying graphs and I am trying to make a library in C# for myself and anyone else interested, that is didactic and simple, so I can remember how to solve common problems.
I would like to ...
2
votes
2answers
476 views
Code review of Pouring water from code chef using Scala
I had posted this question on Stackoverflow and it seems like code review might be a better venue for my query. My question is as follows:
I am trying to solve the pouring water problem from codechef ...