Back to All Algorithms
Best-First Search
Category: Tree / Graph | Time: O(n log n) | Space: O(n)
Visualization
Visual representation of the data structure
Enter tree data to start visualization.
About Best-First Search
A graph search algorithm which explores a graph by expanding the most promising node chosen according to a specified rule. It uses a priority queue to select the next node to visit based on a heuristic cost.
Code Editor
The code is for reference. Editing it won't affect the visualization.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Frequently Asked Questions
About Best-First Search