From f39bf145a73898961f0b54c638ffe21581acf61d Mon Sep 17 00:00:00 2001 From: Nathan Date: Sat, 7 Mar 2015 07:09:38 +0900 Subject: [PATCH 1/2] Update README.md Closes issue #152 --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 7f8f7626d9..bfe254fae1 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![Throughput Graph](https://graphs.waffle.io/freecodecamp/freecodecamp/throughput.svg)](https://waffle.io/freecodecamp/freecodecamp/metrics) + [![Stories in Ready](https://badge.waffle.io/FreeCodeCamp/freecodecamp.png?label=ready&title=Ready)](https://waffle.io/FreeCodeCamp/freecodecamp) From a6cd9876d9f46db0ba0724917dfc74fa21b0ee91 Mon Sep 17 00:00:00 2001 From: Jonathan Boiser Date: Fri, 6 Mar 2015 23:39:45 -0800 Subject: [PATCH 2/2] Rewrite description of Pairwise bonfire. Added second test illustrating the no-reuse rule. --- seed_data/bonfires.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/seed_data/bonfires.json b/seed_data/bonfires.json index dc9dd277a6..8b30d40bc3 100644 --- a/seed_data/bonfires.json +++ b/seed_data/bonfires.json @@ -493,15 +493,15 @@ "name": "Pairwise", "difficulty": "2.16", "description": [ - "Return the sum of all the indexes of elements that can be added to another element of the first array and equal the target provided in the second argument", + "Return the sum of all indices of elements of 'arr' that can be paired with one other element to form a sum that equals the value in the second argument 'arg'. If multiple sums are possible, return the smallest sum. Once an element has been used, it cannot be reused to pair with another.", "For example, pairwise([1, 4, 2, 3, 0, 5], 5) should return 15 because every element can be paired with another element to equal 5.", - "pairwise([1, 3, 2, 4], 4) would only equal 1, because only the first two elements can be paired to equal 4, and the first element has an index of 0!", - "Once an element has been used it cannot be reused to pair with another." + "pairwise([1, 3, 2, 4], 4) would only equal 1, because only the first two elements can be paired to equal 4, and the first element has an index of 0!" ], "challengeSeed": "function pairwise(arr, arg) {\n return arg;\n}\n\npairwise([1,4,2,3,0,5], 5);", "tests": [ "expect(pairwise([1, 4, 2, 3, 0, 5], 5)).to.equal(15);", "expect(pairwise([1, 3, 2, 4], 4)).to.equal(1);", + "expect(pairwise([1,1,1], 2)).to.equal(1);", "expect(pairwise([0, 0, 0, 0, 1, 1], 1)).to.equal(10);", "expect(pairwise([], 100)).to.equal(0);" ]