Sha256: 27f99b3bd6412d11629de27d1cd4aa41da2c30d63d71c9a9816248c40b978543

Contents?: true

Size: 1.3 KB

Versions: 94

Compression:

Stored size: 1.3 KB

Contents

{
  "exercise": "flatten-array",
  "version": "1.2.0",
  "cases": [
    {
      "description": "no nesting",
      "property": "flatten",
      "input": {
        "array": [0, 1, 2]
      },
      "expected": [0, 1, 2]
    },
    {
      "description": "flattens array with just integers present",
      "property": "flatten",
      "input": {
        "array": [1, [2, 3, 4, 5, 6, 7], 8]
      },
      "expected": [1, 2, 3, 4, 5, 6, 7, 8]
    },
    {
      "description": "5 level nesting",
      "property": "flatten",
      "input": {
        "array": [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": {
        "array": [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": {
        "array": [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": {
        "array": [null, [[[null]]], null, null, [[null, null], null], null]
      },
      "expected": []
    }
  ]
}

Version data entries

94 entries across 94 versions & 1 rubygems

Version Path
trackler-2.2.1.180 problem-specifications/exercises/flatten-array/canonical-data.json
trackler-2.2.1.179 problem-specifications/exercises/flatten-array/canonical-data.json
trackler-2.2.1.178 problem-specifications/exercises/flatten-array/canonical-data.json
trackler-2.2.1.177 problem-specifications/exercises/flatten-array/canonical-data.json
trackler-2.2.1.176 problem-specifications/exercises/flatten-array/canonical-data.json
trackler-2.2.1.175 problem-specifications/exercises/flatten-array/canonical-data.json
trackler-2.2.1.174 problem-specifications/exercises/flatten-array/canonical-data.json
trackler-2.2.1.173 problem-specifications/exercises/flatten-array/canonical-data.json
trackler-2.2.1.172 problem-specifications/exercises/flatten-array/canonical-data.json
trackler-2.2.1.171 problem-specifications/exercises/flatten-array/canonical-data.json
trackler-2.2.1.170 problem-specifications/exercises/flatten-array/canonical-data.json
trackler-2.2.1.169 problem-specifications/exercises/flatten-array/canonical-data.json
trackler-2.2.1.167 problem-specifications/exercises/flatten-array/canonical-data.json
trackler-2.2.1.166 problem-specifications/exercises/flatten-array/canonical-data.json
trackler-2.2.1.165 problem-specifications/exercises/flatten-array/canonical-data.json
trackler-2.2.1.164 problem-specifications/exercises/flatten-array/canonical-data.json
trackler-2.2.1.163 problem-specifications/exercises/flatten-array/canonical-data.json
trackler-2.2.1.162 problem-specifications/exercises/flatten-array/canonical-data.json
trackler-2.2.1.161 problem-specifications/exercises/flatten-array/canonical-data.json
trackler-2.2.1.160 problem-specifications/exercises/flatten-array/canonical-data.json