We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 958dff7 commit 80319f5Copy full SHA for 80319f5
scripts/algorithms/P/Path With Minimum Effort/Path With Minimum Effort.js
@@ -1,3 +1,4 @@
1
+// Runtime: 281 ms (Top 86.85%) | Memory: 57.9 MB (Top 59.15%)
2
/**
3
* @param {number[][]} heights
4
* @return {number}
@@ -39,7 +40,7 @@ var minimumEffortPath = function(heights) {
39
40
if (differences[newX][newY] > maxDiff) {
41
differences[newX][newY] = maxDiff;
42
pq.push([newX, newY], maxDiff);
- }
43
+ }
44
}
45
});
46
@@ -107,4 +108,4 @@ PriorityQueue.prototype.shift = function shift() {
107
108
index = smallerIndex;
109
110
return minNode;
-};
111
+};
0 commit comments