DFS categorized directed graph
tree: 0 --> 2
tree: 2 --> 1
back: 1 --> 1
tree: 1 --> 3
back: 3 --> 1
tree: 3 --> 4
back: 4 --> 0
back: 4 --> 1
forward or cross: 2 --> 3

BFS categorized directed graph
tree: 0 --> 2
tree: 2 --> 1
tree: 2 --> 3
cycle: 1 --> 1
cycle: 1 --> 3
cycle: 3 --> 1
tree: 3 --> 4
cycle: 4 --> 0
cycle: 4 --> 1
