0

Graphs

Nodes and edges. Most grid, dependency and network questions are graph questions in disguise.

Newinterview weight 8537 problems7 visualisers
18
mastery
Attempts logged
0
Predicted success on the next one
33%
Solved here
0 / 37

What you actually need to hold in your head

  • BFS gives shortest path on unweighted edges
  • DFS for connectivity, cycles and ordering
  • Dijkstra needs non-negative weights
  • Union-Find answers connectivity incrementally

Watch it run

Step through the algorithm before you write it.

Patterns in this topic

The trigger phrases are what you are training yourself to notice.

Graphs problems

Ordered by sheet phase, so the early ones are the highest signal.

0 / 37 solved
1
2
3
4
HGraphs
5
MGraphs
6
7
8
9
10
11
12
13
14
15
16
17
18
MGraphs
19
MGraphs
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37