Skip to content

Commit 6e7efa2

Browse files
committed
[REFACTOR] [Hacker Rank] Interview Preparation Kit: Sorting: Bubble Sort.
* Adjusted the interface to match what hackerrank expects.
1 parent 0c0ab2e commit 6e7efa2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/hackerrank/interview_preparation_kit/sort/ctci_bubble_sort.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
const SEPARATOR = '\n';
66

7-
export class SortableGroup {
7+
class SortableGroup {
88
group;
99

1010
count;
@@ -38,7 +38,7 @@ export class SortableGroup {
3838
}
3939
}
4040

41-
export function countSwaps(a) {
41+
function countSwaps(a) {
4242
const sortableGroup = new SortableGroup(a);
4343
sortableGroup.bubble_sort();
4444

@@ -53,3 +53,4 @@ export function countSwaps(a) {
5353
}
5454

5555
export default { countSwaps, SortableGroup };
56+
export { countSwaps, SortableGroup };

0 commit comments

Comments
 (0)