Ad
  • Custom User Avatar

    Okay that's encouraging.
    However, you need to hit publish once you've got everything in order otherwise you will get off to a bad start with the satisfaction. You might want to unpublish; make some adjustments; then come back with a new kata. Up to you though.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    I get the feeling that there aren't very many wierd numbers (hence the name?). Thus they can be hardcoded :(

  • Custom User Avatar

    Sorry, I was in hurry when I wrote this.

    (And I made an assumption that you're gonna test for large values)
    Knapsack problem: Maximum (subset sum) < Limit
    But knapsack problem has many variants, in one of the problem ask whether: Maximum (subset sum) == Limit(I believe this is what problem is about)

    But it seems after your fixes, that you didn't intend this kata as performance kata.

    As of now, I'm resolving this as I can't recall the variant on CW.

  • Custom User Avatar

    Thanks for the feedback!

  • Custom User Avatar

    Thanks for the feedback and nice solution!

    I'm not really familiar with the Knapsack problem and after doing some reading on it I can see some similarities. I can't however understand how you could solve the knapsack problem with the same code or same with the same principles you'd need here? (maybe I just can't see it right now) Care to elaborate?

  • Custom User Avatar
    • Duplicate of Knapsack problem.
    • No random tests.
    • Wrong function name in initial solution.
  • Default User Avatar

    Almost fixed.

    There is still a weirdNum in initial solution.

  • Default User Avatar

    In python function names should be snake_case (weird_num).