We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e323f42 commit a9812f4Copy full SHA for a9812f4
Algorithm/ProgrammersCodingTest/PythonCodingTest.py
@@ -4012,4 +4012,21 @@ def dfs(d, office):
4012
4013
dfs(0, office)
4014
4015
-print(min_blind_spot)
+print(min_blind_spot)
4016
+
4017
4018
4019
+# 주식가격(42584) - Lv.2
4020
+def solution(prices):
4021
+ length = len(prices)
4022
+ result = [i for i in range (length - 1, -1, -1)]
4023
+ stack = [0]
4024
4025
+ for i in range (1, length, 1):
4026
+ while stack and prices[stack[-1]] > prices[i]:
4027
+ j = stack.pop()
4028
+ result[j] = i - j
4029
4030
+ stack.append(i)
4031
4032
+ return result
0 commit comments