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 822e804 commit 7e641d5Copy full SHA for 7e641d5
scratch/chapter4/bubble.html
@@ -26,7 +26,8 @@
26
console.log("Highest scoring solutions: " +
27
indexesWithValue(scores, bestBubbleScore) );
28
console.log("Cheapest of highest scoring solutions: " +
29
- indexesOfCheapestSolutionsWithHighestScore(scores, prices));
+ indexesOfCheapestSolutionsWithHighestScore(
30
+ scores, prices, bestBubbleScore));
31
32
33
@@ -59,10 +60,9 @@
59
60
61
62
- function indexesOfCheapestSolutionsWithHighestScore(scores, prices) {
63
-
64
- var highestScore = computeMaximum(scores);
65
+ function indexesOfCheapestSolutionsWithHighestScore(
+ scores, prices, highestScore) {
+
66
// the indexes of the solutions with highest scores
67
var bestSolutions = indexesWithValue(scores, highestScore);
68
0 commit comments