android
[Data structure and algorithm] Introduction to graph actual combat
1 Overview 1.1 The composition of the graph The graph is composed of two sets: the point set V, the edge set E, and the binary definition is G = (V, E). 1.2 Directed and undirected graphs The graph is divided into: directed graph, undirected graph. Undirected graph: Each edge is bidirectional, and (x, y) and (y, x) represent the same result. Directed graph: Each edge is unidirectional, and <x, y> and <y, x> indicate different results. 1.3 In-degree and out-degree Degrees are divided