Skip to content

Commit 2186089

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent bda3f0c commit 2186089

1 file changed

Lines changed: 32 additions & 32 deletions

File tree

data_structures/stacks/stock_span_problem.py

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -10,38 +10,38 @@
1010

1111
def calculation_span(price, s):
1212
"""
13-
Calculate the span values for a given list of stock prices.
14-
Args:
15-
price (list): List of stock prices.
16-
s (list): List to store the span values.
17-
Returns:
18-
None
19-
>>> price = [10, 4, 5, 90, 120, 80]
20-
>>> S = [0 for i in range(len(price) + 1)]
21-
>>> calculation_span(price, S)
22-
>>> S
23-
[1, 1, 2, 4, 5, 6, 0]
24-
>>> price = [100, 50, 60, 70, 80, 90]
25-
>>> S = [0 for i in range(len(price) + 1)]
26-
>>> calculation_span(price, S)
27-
>>> S
28-
[1, 1, 2, 3, 4, 5, 0]
29-
>>> price = [5, 4, 3, 2, 1]
30-
>>> S = [0 for i in range(len(price) + 1)]
31-
>>> calculation_span(price, S)
32-
>>> S
33-
[1, 1, 2, 3, 4, 0]
34-
>>> price = [1, 2, 3, 4, 5]
35-
>>> S = [0 for i in range(len(price) + 1)]
36-
>>> calculation_span(price, S)
37-
>>> S
38-
[1, 2, 3, 4, 5, 0]
39-
>>> price = [10, 20, 30, 40, 50]
40-
>>> S = [0 for i in range(len(price) + 1)]
41-
>>> calculation_span(price, S)
42-
>>> S
43-
[1, 2, 3, 4, 5, 0]
44-
"""
13+
Calculate the span values for a given list of stock prices.
14+
Args:
15+
price (list): List of stock prices.
16+
s (list): List to store the span values.
17+
Returns:
18+
None
19+
>>> price = [10, 4, 5, 90, 120, 80]
20+
>>> S = [0 for i in range(len(price) + 1)]
21+
>>> calculation_span(price, S)
22+
>>> S
23+
[1, 1, 2, 4, 5, 6, 0]
24+
>>> price = [100, 50, 60, 70, 80, 90]
25+
>>> S = [0 for i in range(len(price) + 1)]
26+
>>> calculation_span(price, S)
27+
>>> S
28+
[1, 1, 2, 3, 4, 5, 0]
29+
>>> price = [5, 4, 3, 2, 1]
30+
>>> S = [0 for i in range(len(price) + 1)]
31+
>>> calculation_span(price, S)
32+
>>> S
33+
[1, 1, 2, 3, 4, 0]
34+
>>> price = [1, 2, 3, 4, 5]
35+
>>> S = [0 for i in range(len(price) + 1)]
36+
>>> calculation_span(price, S)
37+
>>> S
38+
[1, 2, 3, 4, 5, 0]
39+
>>> price = [10, 20, 30, 40, 50]
40+
>>> S = [0 for i in range(len(price) + 1)]
41+
>>> calculation_span(price, S)
42+
>>> S
43+
[1, 2, 3, 4, 5, 0]
44+
"""
4545
n = len(price)
4646
st = []
4747
st.append(0)

0 commit comments

Comments
 (0)