Skip to content

Commit c266340

Browse files
committed
flatten-array: Make canonical-data.json compliant
1 parent 067ef4e commit c266340

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed
Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,36 @@
11
{
2+
"exercise": "flatten-array",
3+
"version": "1.0.0",
24
"cases": [
35
{
46
"description": "flattens array with just integers present",
7+
"property": "flatten",
58
"input": [1,[2,3,4,5,6,7],8],
69
"expected": [1,2,3,4,5,6,7,8]
710
},
811
{
912
"description": "5 level nesting",
13+
"property": "flatten",
1014
"input": [0, 2, [[2, 3], 8, 100, 4,[[[50]]]], -2],
1115
"expected":[0, 2, 2, 3, 8, 100, 4, 50, -2]
1216
},
1317
{
1418
"description": "6 level nesting",
19+
"property": "flatten",
1520
"input": [1,[2,[[3]],[4,[[5]]],6,7],8],
1621
"expected":[1,2,3,4,5,6,7,8]
1722
},
1823
{
1924
"description": "6 level nest list with null values",
25+
"property": "flatten",
2026
"input": [0, 2, [[2, 3], 8, [[100]], null, [[null]]], -2],
2127
"expected":[0,2,2,3,8,100,-2]
2228
},
2329
{
2430
"description": "all values in nested list are null",
31+
"property": "flatten",
2532
"input": [null,[[[null]]],null,null,[[null,null],null],null],
2633
"expected":[]
2734
}
2835
]
29-
}
36+
}

0 commit comments

Comments
 (0)