-
-
Notifications
You must be signed in to change notification settings - Fork 656
Closed
Labels
help wantedx:action/syncSync content with its latest versionSync content with its latest versionx:module/practice-exerciseWork on Practice ExercisesWork on Practice Exercisesx:size/smallSmall amount of workSmall amount of workx:type/contentWork on content (e.g. exercises, concepts)Work on content (e.g. exercises, concepts)
Description
The number of moves for the 6th test is wrong.
describe('Measure using bucket one of size 2 and bucket two of size 3', () => {
xtest('start with bucket one and end with bucket two', () => {
const twoBucket = new TwoBucket(2, 3, 3, 'one');
expect(twoBucket.moves()).toEqual(4);
expect(twoBucket.goalBucket).toEqual('two');
expect(twoBucket.otherBucket).toEqual(1);
});
});The number of moves should be 2:
- fill the start bucket
- since the other bucket size == the goal, fill it
- there is no move 3.
Following that change, the otherBucket amount should be 2 (the start bucket is full).
I humbly suggest my solution as a reference solution.
This was changed in #1396.
Metadata
Metadata
Assignees
Labels
help wantedx:action/syncSync content with its latest versionSync content with its latest versionx:module/practice-exerciseWork on Practice ExercisesWork on Practice Exercisesx:size/smallSmall amount of workSmall amount of workx:type/contentWork on content (e.g. exercises, concepts)Work on content (e.g. exercises, concepts)