Skip to content

Commit 9614c5e

Browse files
authored
Added space for control flow statements
1 parent 9a5392a commit 9614c5e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

javascript/0739-daily-temperatures.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ var dailyTemperatures = function(temp) {
88
let res = new Array(temp.length).fill(0)
99
let stack = []
1010

11-
for(let i = 0; i < temp.length; i++){
12-
while(stack.length && temp[i] > temp[stack[stack.length - 1]]){
11+
for (let i = 0; i < temp.length; i++){
12+
while (stack.length && temp[i] > temp[stack[stack.length - 1]]){
1313
let idx = stack.pop()
1414
res[idx] = i - idx
1515
}
@@ -78,4 +78,4 @@ const search = (temperatures, day, temperature, days, dayCount = 1) => {
7878
while (isHotter()) dayCount += days[day + dayCount]; /* Time O(N + N) */
7979

8080
days[day] = dayCount; /* Ignore Space O(N) */
81-
}
81+
}

0 commit comments

Comments
 (0)