Skip to main content

Graph traversals

Graph traversal is a process of visiting every node in the graph. Think of a postman that has to visit all of the houses in your block. Some nodes can be visited more than once. Usually, it is necessary to remember which nodes were previously visited to revisit those nodes as infrequently as possible.

There are two main graph traversal algorithms:

Learn more

There are many graph algorithms libraries out there, with their own implementations of graph traversal algorithms. NetworkX's algorithms are written in Python, and there are many other libraries that offer faster C++ implementations, such as MAGE, a graph algorithms library developed by Memgraph team.