A graph is a non-linear data structure that represents relationships between objects. It's defined by a set of nodes (vertices) and edges that connect those nodes. Graphs are useful for modeling complex relationships, such as social networks, road networks, or dependencies between tasks. They provide a powerful way to represent and analyze interconnected data.
There are several ways to represent graphs in computer science.