-
-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Knapsack #700
Add Knapsack #700
Conversation
6ec0041
to
258064a
Compare
258064a
to
e49b169
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fantastic, thank you for the contribution!
I left a bunch of nitpicks because I'm a grumpy nitpicky man, but I'll be happy to merge this :)
"slug": "knapsack", | ||
"name": "Knapsack", | ||
"uuid": "9bf186d3-e904-42f2-a705-dffbe98adb08", | ||
"practices": [], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[You don't need to do anything here] This is also a good candidate for #692
config.json
Outdated
"lists", | ||
"records" | ||
], | ||
"difficulty": 6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel like a 7 or an 8, because the algorithm isn't trivial. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a 7 is also reasonable. My hesitance with going to an 8 is seeing Zebra puzzle at 8 (and me thinking its not quite as hard Zebra Puzzle). The other thought I have is this example solution uses memoization. A simpler solution could be to use recursion without the memoization (although it won't be as efficient).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes you're right, it's not quite a Zebra puzzle.
In the end it's not an exact science, but 7 feels right :)
Thanks for the review @jiegillet! I was happy with the suggestions and have pushed the updates. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice, thanks again.
This is one of the 48in24 exercises.