book store: Explain importance of greediness vs non-greediness #550
+7
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.