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.
That's weird ... I wrote a valid algorithm to check a set but it's O(n^2) and just too slow to verify a big set. Therefore I added a shortcut: always return "NO" whenever a set has 30+ elements. I got a final score of 100% :-)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #105: Special subset sums: testing
You are viewing a single comment's thread. Return to all comments →
That's weird ... I wrote a valid algorithm to check a set but it's O(n^2) and just too slow to verify a big set. Therefore I added a shortcut: always return "NO" whenever a set has 30+ elements. I got a final score of 100% :-)