A sparse graph is a type of graph that has relatively few edges compared to the number of vertices it contains. In mathematical terms, if a graph has n vertices and m edges, it is considered sparse when m is much less than n², typically when m = O(n). This characteristic affects various algorithms, especially those designed for the single-source shortest path problem, where efficiency can be significantly improved due to fewer edges needing to be processed.
congrats on reading the definition of sparse graph. now let's actually learn it.