Overview - Graph Terminology Vertices Edges Directed Undirected Weighted
What is it?
A graph is a way to show connections between things using points called vertices and lines called edges. Vertices represent objects, and edges show how these objects relate. Graphs can have directions on edges, meaning the connection goes one way, or no direction, meaning the connection is two-way. Sometimes edges have weights, which are numbers showing the strength or cost of the connection.
Why it matters
Graphs help us understand and solve problems involving relationships, like social networks, maps, or computer networks. Without graphs, it would be hard to organize or analyze these connections clearly. They let us find shortest paths, detect groups, or model real-world systems efficiently.
Where it fits
Before learning graphs, you should know basic data structures like arrays and lists. After graphs, you can learn graph algorithms like searching, shortest path, and spanning trees. Graphs build on simple connections and lead to complex problem solving.