In computer science, a digraph, or directed graph, is a set of nodes connected by edges that have a direction. Each edge points from one node to another, indicating a one-way relationship. Digraphs are useful for representing structures like networks, where the direction of connections matters, such as in social media connections or web page links.
Digraphs can be used in various algorithms, including shortest path algorithms and topological sorting. They help in modeling problems where direction is essential, such as in task scheduling or dependency resolution. Understanding digraphs is crucial for efficient data organization and retrieval in computer science.