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.
The editorial assumes that if two subtrees hash to the same value, they are equal. While this may work for the given input data, it is a bad assumption in general. Disappointing. Especially since it is possible to check for such collisions within the time limits, given a careful implementation.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Jenny's Subtrees
You are viewing a single comment's thread. Return to all comments →
The editorial assumes that if two subtrees hash to the same value, they are equal. While this may work for the given input data, it is a bad assumption in general. Disappointing. Especially since it is possible to check for such collisions within the time limits, given a careful implementation.