1. Consider the problem of searching an element x in an array of size n. which class of algorithm can we use If we want to solve the problem in O(Logn)
a. Divide and Conquer
b. Best first search algorithm
c. Greedy algorithm
d. Dynamic Programming
Answer:
C. Best first search algorithm.
Explanation:
Best first search algorithm is a search algorithm which explores a graph by expanding the most promising node choosen according to specific rule.
Algorithms in Best first search:
1.Breadth first search
2.Depth first search
They uses the heuristic function and search.
Comments
Leave a comment