Project Euler #106: Special subset sums: meta-testing

Sort by

recency

|

3 Discussions

|

  • + 0 comments

    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

  • + 0 comments

    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.

  • + 0 comments

    I lost my confidence because this is marked as easy.

    Hints for those who come later:

    • Your clever DP solution will score 0.00
    • Your O(n) solution will score 0.00
    • I got 100 after looking up some basic modular arithmetic and combining everything

No more comments