File tree 2 files changed +25
-1
lines changed
src/hackerrank/interview_preparation_kit/arrays
2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import TEST_CASES from './2d_array.testcases_test.json';
6
6
7
7
describe ( 'arrays: 2d Array hourglassSum' , ( ) => {
8
8
it ( 'hourglassSum Test Cases' , ( ) => {
9
- expect . assertions ( 1 ) ;
9
+ expect . assertions ( 3 ) ;
10
10
11
11
TEST_CASES . forEach ( ( test ) => {
12
12
const answer = hourglassSum ( test . input ) ;
Original file line number Diff line number Diff line change 10
10
[0 , 0 , 1 , 2 , 4 , 0 ]
11
11
],
12
12
"expected" : 19
13
+ },
14
+ {
15
+ "title" : " Sample Test Case 1" ,
16
+ "input" : [
17
+ [1 , 1 , 1 , 0 , 0 , 0 ],
18
+ [0 , 1 , 0 , 0 , 0 , 0 ],
19
+ [1 , 1 , 1 , 0 , 0 , 0 ],
20
+ [0 , 9 , 2 , -4 , -4 , 0 ],
21
+ [0 , 0 , 0 , -2 , 0 , 0 ],
22
+ [0 , 0 , -1 , -2 , -4 , 0 ]
23
+ ],
24
+ "expected" : 13
25
+ },
26
+ {
27
+ "title" : " Sample Test Case 2" ,
28
+ "input" : [
29
+ [-9 , -9 , -9 , 1 , 1 , 1 ],
30
+ [0 , -9 , 0 , 4 , 3 , 2 ],
31
+ [-9 , -9 , -9 , 1 , 2 , 3 ],
32
+ [0 , 0 , 8 , 6 , 6 , 0 ],
33
+ [0 , 0 , 0 , -2 , 0 , 0 ],
34
+ [0 , 0 , 1 , 2 , 4 , 0 ]
35
+ ],
36
+ "expected" : 28
13
37
}
14
38
]
You can’t perform that action at this time.
0 commit comments