Skip to content

Commit f2b980d

Browse files
committed
[REFACTOR] [Hacker Rank] Interview Preparation Kit: Greedy Algorithms: Max Min.
* Adjusted the interface to match what hackerrank expects.
1 parent 7aa67dc commit f2b980d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/hackerrank/interview_preparation_kit/greedy_algorithms/angry_children.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* @link Problem definition [[docs/hackerrank/interview_preparation_kit/greedy_algorithms/angry-children.md]]
33
*/
44

5-
export function maxMin(k, arr) {
5+
function maxMin(k, arr) {
66
const sortedlist = arr.map((x) => x).sort((a, b) => a - b);
77

88
let result = sortedlist[sortedlist.length - 1] - sortedlist[0];
@@ -17,3 +17,4 @@ export function maxMin(k, arr) {
1717
}
1818

1919
export default { maxMin };
20+
export { maxMin };

0 commit comments

Comments
 (0)