Learn
Practice
Newsletter
Resources
F
Toggle theme
0
F
Toggle theme
0
Toggle menu
← Back to All Animations
Centroid Decomposition
Bookmark
Input
Standard Tree (7 nodes)
Path Graph (5 nodes)
Star Graph (7 nodes)
Balanced Binary Tree (9 nodes)
Custom
n
=
7
,
edges
=
[[0,1],[1,2],[1,3],[3,4],[3,5],[5,6]]
Original Tree
Original Tree
0
1
2
3
4
5
6
CD Tree
(builds as centroids are found)
Legend:
Unprocessed
Component
Centroid
Removed
algo
master
.
io
Step:
Start: Centroid Decomposition of the tree
0 / 28
Input
Standard Tree (7 nodes)
Path Graph (5 nodes)
Star Graph (7 nodes)
Balanced Binary Tree (9 nodes)
Custom
n
=
7
,
edges
=
[[0,1],[1,2],[1,3],[3,4],[3,5],[5,6]]
0 / 28
Original Tree
Original Tree
0
1
2
3
4
5
6
CD Tree
(builds as centroids are found)
Legend:
Unprocessed
Component
Centroid
Removed
algo
master
.
io
Step:
Start: Centroid Decomposition of the tree