Back to course home
0% completed
Vote For New Content
This question needs a good few diagrams to explain the 'centroid' graph finding ...
Will
Jun 16, 2022
This question needs a good few diagrams to explain the 'centroid' graph finding idea, as it's not that intuitive from the description unfortunately. It may also benefit to explain the logical progression from a O(N^2) BFS or DFS brute-force idea to the optimal topological sort idea (with diagrams).
An alternate in-depth explanation of this solution exists on Leetcode here: (Q. 310: https://leetcode.com/problems/minimum-height-trees/solution/ ).
4
0
Comments
Comments
M
Mikhail Putilov2 years ago
Thank you for the link!
On this page