Degree
Domain: Data Structures
🎯 Motivation
The degree of a node is the number of edges connected to it. In directed graphs, we distinguish in-degree and out-degree.
📋 Concrete Example
Node Alice with edges to Bob, Carol, and Dave has degree 3. In a directed graph, if 2 people follow Alice and Alice follows 1, in-degree is 2 and out-degree is 1.
🔗 Analogy
The number of friends someone has on social media. If Alice has 50 friends, her degree is 50. More friends means more connections (edges).