{ "exercise": "pascals-triangle", "version": "1.2.0", "comments": [ "Expectations are represented here as an array of arrays.", "How you represent this idiomatically in your language is up to you.", "An expectation of -1 indicates some sort of failure should occur" ], "cases": [ { "description": "Given a count, return a collection of that many rows of pascal's triangle", "cases": [ { "description": "zero rows", "property": "rows", "count": 0, "expected": [] }, { "description": "single row", "property": "rows", "count": 1, "expected": [[1]] }, { "description": "two rows", "property": "rows", "count": 2, "expected": [[1], [1, 1]] }, { "description": "three rows", "property": "rows", "count": 3, "expected": [[1], [1, 1], [1, 2, 1]] }, { "description": "four rows", "property": "rows", "count": 4, "expected": [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1]] }, { "description": "five rows", "property": "rows", "count": 5, "expected": [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1], [1, 4, 6, 4, 1]] }, { "description": "six rows", "property": "rows", "count": 6, "expected": [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1], [1, 4, 6, 4, 1], [1, 5, 10, 10, 5, 1]] }, { "description": "ten rows", "property": "rows", "count": 10, "expected": [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1], [1, 4, 6, 4, 1], [1, 5, 10, 10, 5, 1], [1, 6, 15, 20, 15, 6, 1], [1, 7, 21, 35, 35, 21, 7, 1], [1, 8, 28, 56, 70, 56, 28, 8, 1], [1, 9, 36, 84, 126, 126, 84, 36, 9, 1]] }, { "description": "negative rows", "property": "rows", "count": -1, "expected": -1 } ] } ] }