Xenia and Tree - Ceontroid Decomposition

So I’m currently not sure why this solution for Xenia and Tree is failing. I’m doing what @galencolin described in a tutorial but it’s failing the fourth test. There may be an error in my LCA/distance function, but I don’t believe that is the case. I’d appreciate the help, here’s the link to the submission:

Submission link

Though, it’s been a while i have written centroid decomposition. I will see what i can do and get back to you

1 Like