Neku's Blog

Graph

So yea, this day I learned about graph. There are two types of graphs:

Thennn.. to store the graph, there are 2 ways:

I think adjacency list is more often used.. and then for traversing the graph we know that there are two ways: DFS and BFS. Actually, the difference only lies in the stack (used in DFS) and queue (used in BFS).

related link :