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.
Project Euler #106: Special subset sums: meta-testing
Project Euler #106: Special subset sums: meta-testing
Contest ends in
This problem is frustrating not for its complexity; it's actually quite intriguing and interesting all the logic and optimizations you can go through. I went from several loops to consolidating down to a very concise setup, breaking down into combinatorics and factorials. But, the testcases are not scaled well, at all. None of my optimizations mattered until I found an exact algorithm in the OEIS. I wish I'd gotten some positive feedback from optimizing from n = 15 to n= 10000, but none of it mattered... https://medium.com/andys-coding-blog/project-euler-106-subset-sums-meta-testing-e5b222c5a45e
I agree this is far from easy. As we progress in this series the difference in difficulty between the projecteuler.net problem and the hackerrank problem becomes vast. I can solve the first version easily using simple methods and then sweat for days or weeks to meet the performance constraints of the latter, often with a completely different solution approach. This one for example nearly made me quit.
I lost my confidence because this is marked as easy.
Hints for those who come later: