The conversation between human and AI assistant.
What are some basic graph theory questions (BFS/DFS/SCC/shortest paths/topo/that sort) from online judges like SPOJ and CodeChef, in increasing order of difficulty? I'm not good at even identifying graph questions.
Yes, please explain them briefly.
Okay, BFS (breadth-first search) is an algorithm for traversing or searching tree or graph data structures. DFS (depth-first search) is another algorithm for tree and graph traversal that explores as far as possible along each branch before backtracking. SCC (strongly connected components) is a partition of the vertices of a directed graph into strongly connected subgraphs. Shortest path algorithms find the shortest path between two vertices in a graph. Finally, topological sorting is a type of sorting that dictates the order in which vertices in a directed graph should be visited.