Depth-first search (DFS) and breadth-first search (BFS) are algorithms for traversing or searching trees and graphs. DFS uses a stack and recursively explores as far as possible along each branch before backtracking, while BFS uses a queue and explores neighboring nodes first before moving to the next level. A minimum spanning tree (MST) is a subgraph that connects all vertices with minimum total edge weight. Common algorithms to find an MST are Kruskal's algorithm, which adds edges in order of weight, and Prim's algorithm, which grows the tree from an initial vertex.