Algorithms

Directed graph

A graph where each edge has a direction: A → B doesn't imply B → A. If each edge also has a number, like a distance, it's weighted. If you can reach any vertex from any other, it's connected.

Example

Following someone on a social network is directed: you follow an account with 1 million followers and it doesn't follow you.

Test yourself: Directed graph

Graphs

In a directed graph, if there's an edge from A to B, there's also one from B to A.

Lessons that use it

More algorithms terms

All terms →

Arki, the beaver mascot

Your next interview starts with 5 minutes today.

Free on iOS and Android. Start from zero, no account needed.