Data Structures

Graph

Definition

A data structure consisting of nodes (vertices) connected by edges. Graphs can be directed or undirected, weighted or unweighted. Used to model networks, social connections, maps, and dependencies.

Code Example

Javascript
Tip: Modify the code above and click “Run” to see the results

Learn More

Related Terms