Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
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.
This comment is hidden because it contains spoiler information about the solution
I get the feeling that there aren't very many wierd numbers (hence the name?). Thus they can be hardcoded :(
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.
Thanks for the feedback!
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?
Almost fixed.
There is still a
weirdNum
in initial solution.In python function names should be snake_case (
weird_num
).