We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Finally I solved it. It took a few days to understand that several tests failed for timeout because I was using a slow implementation of UnionFind O(N). As soon as I switched to QuickUnionUF O(logN) all the tests became green.
Super Mancunian
You are viewing a single comment's thread. Return to all comments →
Finally I solved it. It took a few days to understand that several tests failed for timeout because I was using a slow implementation of UnionFind O(N). As soon as I switched to QuickUnionUF O(logN) all the tests became green.
http://vancexu.github.io/2015/07/13/intro-to-union-find-data-structure.html