Skip to content

Commit 7aa67dc

Browse files
committed
[REFACTOR] [Hacker Rank] Interview Preparation Kit: Greedy Algorithms: Greedy Florist.
* TEST data moved to JSON. * Adjusted the interface to match what hackerrank expects.
1 parent f9895a9 commit 7aa67dc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/hackerrank/interview_preparation_kit/greedy_algorithms/greedy_florist.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @see Solution Notes: [[docs/hackerrank/interview_preparation_kit/greedy_algorithms/greedy-florist-solution-notes.md]]
44
*/
55

6-
export function getMinimumCost(k, c) {
6+
function getMinimumCost(k, c) {
77
const flowers = c.map((x) => x).sort((a, b) => b - a);
88

99
let total = 0;
@@ -20,3 +20,4 @@ export function getMinimumCost(k, c) {
2020
}
2121

2222
export default { getMinimumCost };
23+
export { getMinimumCost };

0 commit comments

Comments
 (0)