Skip to content
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

book store: Explain importance of greediness vs non-greediness #550

Merged
merged 2 commits into from
Feb 13, 2017
Merged

book store: Explain importance of greediness vs non-greediness #550

merged 2 commits into from
Feb 13, 2017

Conversation

petertseng
Copy link
Member

@petertseng petertseng commented Feb 12, 2017

It is important to us that descriptions explain why a case is being tested.

To this end, I explain in the description why the 11223345 case is being tested: Because you cannot greedily add books to a single group in this case. You have to know that two groups of four is cheaper than five plus three.

If this is not made clear, people may make assumptions that greedy is the correct way to go, as in: exercism/csharp#181

To contrast this, immediately after I add a case where you should greedily add books to a single group: 4 + 2 is cheaper than 3 + 3.

I do not have in mind right now a better description for any other case in this file.

You cannot greedily add books to a single group in this case. You have
to try the possibilities and see that two groups of four is a cheaper
grouping than a group of five and a group of three.

If this is not made clear, people may make assumptions that greedy is
the correct way to go, as in:
exercism/csharp#181
In the former, you MUST NOT be greedy.
In the latter, you MUST be greedy.
@petertseng
Copy link
Member Author

@ErikSchierboom
Copy link
Member

LGTM!

@ErikSchierboom ErikSchierboom merged commit 4c617d5 into exercism:master Feb 13, 2017
@petertseng petertseng deleted the book-store branch February 13, 2017 09:30
emcoding pushed a commit that referenced this pull request Nov 19, 2018
re: #520

Hello world exercise updated to only return 'Hello world!' without the name substitution that was present in the previous version.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants