forked from exercism/problem-specifications
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbracket-push.json
69 lines (69 loc) · 1.49 KB
/
bracket-push.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
{
"cases": [
{
"description": "paired square brackets",
"input": "[]",
"expected": true
},
{
"description": "empty string",
"input": "",
"expected": true
},
{
"description": "unpaired brackets",
"input": "[[",
"expected": false
},
{
"description": "wrong ordered brackets",
"input": "}{",
"expected": false
},
{
"description": "paired with whitespace",
"input": "{ }",
"expected": true
},
{
"description": "simple nested brackets",
"input": "{[]}",
"expected": true
},
{
"description": "several paired brackets",
"input": "{}[]",
"expected": true
},
{
"description": "paired and nested brackets",
"input": "([{}({}[])])",
"expected": true
},
{
"description": "unopened closing brackets",
"input": "{[)][]}",
"expected": false
},
{
"description": "unpaired and nested brackets",
"input": "([{])",
"expected": false
},
{
"description": "paired and wrong nested brackets",
"input": "[({]})",
"expected": false
},
{
"description": "math expression",
"input": "(((185 + 223.85) * 15) - 543)/2",
"expected": true
},
{
"description": "complex latex expression",
"input": "\\left(\\begin{array}{cc} \\frac{1}{3} & x\\\\ \\mathrm{e}^{x} &... x^2 \\end{array}\\right)",
"expected": true
}
]
}