Breadth-first search (BFS) is a method for exploring a tree or graph. In a BFS, you first explore all the nodes one step away, then all the nodes two steps away, etc. Breadth-first search is like throwing a stone in the center of a pond. The nodes you explore "ripple out" from the starting point.
Source:Breadth First Search
Depth-first search (DFS) is a method for exploring a tree or graph. In a DFS, you go as deep as possible down one path before backing up and trying a different one. Depth-first search is like walking through a corn maze. You explore one path, hit a dead end, and go back and try a different one.
Source:Depth First Search, Artificial Intelligence: tree search algorithms
Dijkstra's algorithm finds the shortest path from one node to all other nodes in a weighted graph. Say we had the following graph, which represents the travel cost between different cities in the southeast US (see the left pic).Dijkstra's algorithm lets us find the cheapest route from one city to all other cities (see the right pic).
Source:Dijkstra's Algorithm
A* (pronounced "A-star") is a graph traversal and path search algorithm, which is used in many fields of computer science due to its completeness, optimality, and optimal efficiency. One major practical drawback is its O(b^d) space complexity, as it stores all generated nodes in memory. Thus, in practical travel-routing systems, it is generally outperformed by algorithms that can pre-process the graph to attain better performance, as well as memory-bounded approaches; however, A* is still the best solution in many cases.
Source:A* Search
Insertion sort works by inserting elements from an unsorted list into a sorted subsection of the list, one item at a time.
Quicksort works by dividing the input into two smaller lists: one with small items and the other with large items. Then, it recursively sorts both the smaller lists.
Source:Quick Sort, Quick Sort in C++
Merge sort is based on the divide-and-conquer strategy. Merge sort continuously cuts down a list into multiple sublists until each has only one item, then merges those sublists into a sorted list.
Source:Merge Sort