Depth-first search and linear graph algorithms | Synapse