File tree Expand file tree Collapse file tree 2 files changed +25
-1
lines changed
src/hackerrank/interview_preparation_kit/arrays Expand file tree Collapse file tree 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';
66
77describe ( 'arrays: 2d Array hourglassSum' , ( ) => {
88 it ( 'hourglassSum Test Cases' , ( ) => {
9- expect . assertions ( 1 ) ;
9+ expect . assertions ( 3 ) ;
1010
1111 TEST_CASES . forEach ( ( test ) => {
1212 const answer = hourglassSum ( test . input ) ;
Original file line number Diff line number Diff line change 1010 [0 , 0 , 1 , 2 , 4 , 0 ]
1111 ],
1212 "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
1337 }
1438]
You can’t perform that action at this time.
0 commit comments