We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b620621 commit 260420cCopy full SHA for 260420c
1235-maximum-profit-in-job-scheduling.js
@@ -19,7 +19,7 @@ const jobScheduling = function (startTime, endTime, profit) {
19
e = item[1],
20
p = item[2]
21
// find previous endTime index
22
- let prevIdx = binarySearch(dpEndTime, 0, dpEndTime.length - 1, s)
+ const prevIdx = binarySearch(dpEndTime, 0, dpEndTime.length - 1, s)
23
const currProfit = dpProfit[prevIdx] + p,
24
maxProfit = dpProfit[dpProfit.length - 1]
25
if (currProfit > maxProfit) {
0 commit comments