We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7aa67dc commit f2b980dCopy full SHA for f2b980d
src/hackerrank/interview_preparation_kit/greedy_algorithms/angry_children.js
@@ -2,7 +2,7 @@
2
* @link Problem definition [[docs/hackerrank/interview_preparation_kit/greedy_algorithms/angry-children.md]]
3
*/
4
5
-export function maxMin(k, arr) {
+function maxMin(k, arr) {
6
const sortedlist = arr.map((x) => x).sort((a, b) => a - b);
7
8
let result = sortedlist[sortedlist.length - 1] - sortedlist[0];
@@ -17,3 +17,4 @@ export function maxMin(k, arr) {
17
}
18
19
export default { maxMin };
20
+export { maxMin };
0 commit comments