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.
Agree with cdv20. The implementation is the same for a binary or n-ary tree (undirected acyclic graph). You look at all the connections for each vertex that haven't been visited.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Cut the Tree
You are viewing a single comment's thread. Return to all comments →
Agree with cdv20. The implementation is the same for a binary or n-ary tree (undirected acyclic graph). You look at all the connections for each vertex that haven't been visited.