algoritmauzmanı
Sign in
TREN
Part 8

Graphs

17lessons2 h 18 min0done

A graph keeps objects and the connections between them. Road maps, social networks, computer networks, the links between web pages and the prerequisite chain of courses are all graphs. A tree is a special graph with no cycles.

The part codes the graph first with an adjacency matrix, then with adjacency lists: creating it, adding and removing edges, neighbours and degree, breadth-first search (BFS) and depth-first search (DFS). Then it covers connected components, finding a cycle, topological sort and shortest paths, and ends with exam questions.

Lesson 8.0 What is a graph?7 min