Learn
Practice
Newsletter
Resources
F
Toggle theme
0
F
Toggle theme
0
Toggle menu
← Back to All Animations
924. Minimize Malware Spread
Bookmark
Input
Example 1
Example 2
Example 3
Two Components
Different Sizes
6 Nodes
Custom
graph
=
[[1,1,0],[1,1,0],[0,0,1]]
,
initial
=
[0,1]
Network Graph
0
1
2
Infected Nodes: [0, 1]
Union-Find Components
Legend:
Healthy
Infected
Analyzing
Best Choice
algo
master
.
io
Step:
Given a network of 3 nodes with 2 initially infected nodes: [0, 1]. Find which infected node to remove to minimize total infection spread.
0 / 9
Input
Example 1
Example 2
Example 3
Two Components
Different Sizes
6 Nodes
Custom
graph
=
[[1,1,0],[1,1,0],[0,0,1]]
,
initial
=
[0,1]
0 / 9
Network Graph
0
1
2
Infected Nodes: [0, 1]
Union-Find Components
Legend:
Healthy
Infected
Analyzing
Best Choice
algo
master
.
io
Step:
Given a network of 3 nodes with 2 initially infected nodes: [0, 1]. Find which infected node to remove to minimize total infection spread.