Graph Fundamentals
A graph is a non-linear data structure consisting of vertices and edges that represent relationships between entities. A vertex is an individual node, an edge connects two vertices, and the degree of a vertex is the number of incident edges. In directed graphs, we distinguish indegree and outdegree.
Vertex: Entity or node in the graph.
Edge: Relationship connecting two vertices.
Degree: Number of edges incident on a vertex.
Directed graphs have indegree and outdegree.
Graphs may be weighted, unweighted, cyclic, or acyclic.