Sha256: 5223e7595a09b204f482556694dffb0f2ca09b88f9917d11bf8fd65f433675d2

Contents?: true

Size: 1.02 KB

Versions: 23

Compression:

Stored size: 1.02 KB

Contents

{
  "exercise": "flatten-array",
  "version": "1.0.0",
  "cases": [
    {
      "description": "flattens array with just integers present",
      "property": "flatten",
      "input": [1, [2, 3, 4, 5, 6, 7], 8],
      "expected": [1, 2, 3, 4, 5, 6, 7, 8]
    },
    {
      "description": "5 level nesting",
      "property": "flatten",
      "input": [0, 2, [[2, 3], 8, 100, 4, [[[50]]]], -2],
      "expected": [0, 2, 2, 3, 8, 100, 4, 50, -2]
    },
    {
      "description": "6 level nesting",
      "property": "flatten",
      "input": [1, [2, [[3]], [4, [[5]]], 6, 7], 8],
      "expected": [1, 2, 3, 4, 5, 6, 7, 8]
    },
    {
      "description": "6 level nest list with null values",
      "property": "flatten",
      "input": [0, 2, [[2, 3], 8, [[100]], null, [[null]]], -2],
      "expected": [0, 2, 2, 3, 8, 100, -2]
    },
    {
      "description": "all values in nested list are null",
      "property": "flatten",
      "input": [null, [[[null]]], null, null, [[null, null], null], null],
      "expected": []
    }
  ]
}

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
trackler-2.0.8.40 common/exercises/flatten-array/canonical-data.json
trackler-2.0.8.39 common/exercises/flatten-array/canonical-data.json
trackler-2.0.8.38 common/exercises/flatten-array/canonical-data.json
trackler-2.0.8.37 common/exercises/flatten-array/canonical-data.json
trackler-2.0.8.36 common/exercises/flatten-array/canonical-data.json
trackler-2.0.8.35 common/exercises/flatten-array/canonical-data.json
trackler-2.0.8.34 common/exercises/flatten-array/canonical-data.json
trackler-2.0.8.33 common/exercises/flatten-array/canonical-data.json
trackler-2.0.8.32 common/exercises/flatten-array/canonical-data.json
trackler-2.0.8.31 common/exercises/flatten-array/canonical-data.json
trackler-2.0.8.30 common/exercises/flatten-array/canonical-data.json
trackler-2.0.8.29 common/exercises/flatten-array/canonical-data.json
trackler-2.0.8.28 common/exercises/flatten-array/canonical-data.json
trackler-2.0.8.27 common/exercises/flatten-array/canonical-data.json
trackler-2.0.8.26 common/exercises/flatten-array/canonical-data.json
trackler-2.0.8.24 common/exercises/flatten-array/canonical-data.json
trackler-2.0.8.23 common/exercises/flatten-array/canonical-data.json
trackler-2.0.8.22 common/exercises/flatten-array/canonical-data.json
trackler-2.0.8.21 common/exercises/flatten-array/canonical-data.json
trackler-2.0.8.20 common/exercises/flatten-array/canonical-data.json