Skip to content

Commit 04aa8e4

Browse files
committed
[REFACTOR] [Hacker Rank] Interview Preparation Kit: Stacks and Queues: Balanced Brackets.
* Adjusted the interface to match what hackerrank expects.
1 parent 5f24a22 commit 04aa8e4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/hackerrank/interview_preparation_kit/stacks_and_queues/balanced_brackets.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
const __YES__ = 'YES';
66
const __NO__ = 'NO';
77

8-
export function isBalancedCompute(s) {
8+
function isBalancedCompute(s) {
99
const pairs = { '{': '}', '(': ')', '[': ']' };
1010
const brackets = [];
1111

@@ -27,8 +27,9 @@ export function isBalancedCompute(s) {
2727
return brackets.length <= 0;
2828
}
2929

30-
export function isBalanced(s) {
30+
function isBalanced(s) {
3131
return isBalancedCompute(s) ? __YES__ : __NO__;
3232
}
3333

3434
export default { isBalanced };
35+
export { isBalanced };

0 commit comments

Comments
 (0)