Skip to content

Commit 489e7d2

Browse files
committed
[REFACTOR] [Hacker Rank] Interview Preparation Kit: Array: 2D Array - DS.
Adjusted the interface to match what hackerrank expects. Standarized way.
1 parent 5e14b03 commit 489e7d2

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/hackerrank/interview_preparation_kit/arrays/2d_array.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,4 @@ function hourglassSum(arr) {
5858
}
5959

6060
export default { hourglassSum };
61+
export { hourglassSum };

src/hackerrank/interview_preparation_kit/arrays/2d_array.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import { describe, expect, it } from '@jest/globals';
22
import { logger as console } from '../../../logger.js';
33

4-
import twoDArray from './2d_array.js';
4+
import { hourglassSum } from './2d_array.js';
55
import TEST_CASES from './2d_array.testcases_test.json';
66

77
describe('arrays: 2d Array hourglassSum', () => {
88
it('hourglassSum Test Cases', () => {
99
expect.assertions(3);
1010

1111
TEST_CASES.forEach((test) => {
12-
const answer = twoDArray.hourglassSum(test.input);
12+
const answer = hourglassSum(test.input);
1313

1414
console.debug(
1515
`gethourGlass(${test.input.toString()}) solution found: ${answer}`

0 commit comments

Comments
 (0)