Question: Algorithm questions. 1.When choosing an algorithm for the shortest path between two nodes in an unweighted graph, should we use Breadth First Search or Depth
Algorithm questions.
1.When choosing an algorithm for the shortest path between two nodes in an unweighted graph, should we use Breadth First Search or Depth First Search ?
2. When choosing a data structure to store a graph for an algorithm, how should we store the graph knowing that the graph is dense and this algorithm needs to determine many times if two nodes are directly connected ? Should it be an Adjacency Matrix or an Adjacency List ?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
