October 12, 2023
October 12, 2023
October 12, 2023
###### Algorithms
October 12, 2023
 Question 38

Which one of the following statements is false?

 A Optimal binary search tree construction can be performed efficiently using dynamic programming. B Breadth-first search cannot be used to find connected components of a graph. C Given the prefix and postfix walks over a binary tree, the binary tree cannot be uniquely constructed. D Depth-first search can be used to find connected components of a graph.
Question 38 Explanation:
In BFS algorithm, we can randomly select a source vertex and then run, after that whether we need to check distance to each and every vertex from source is still infinite (or) not. If we find any vertex having infinite distance then the graph is not connected.
Question 38 Explanation:
In BFS algorithm, we can randomly select a source vertex and then run, after that whether we need to check distance to each and every vertex from source is still infinite (or) not. If we find any vertex having infinite distance then the graph is not connected.