Skip to content

Commit c0e2b16

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

1 file changed

Lines changed: 20 additions & 20 deletions

File tree

data_structures/stacks/stock_span_problem.py

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

1111
def calculation_span(price):
1212
"""
13-
Calculate the span values for a given list of stock prices.
14-
Args:
15-
price (list): List of stock prices.
16-
Returns:
17-
>>> price = [10, 4, 5, 90, 120, 80]
18-
>>> calculation_span(price)
19-
[1, 1, 2, 4, 5, 6]
20-
>>> price = [100, 50, 60, 70, 80, 90]
21-
>>> calculation_span(price)
22-
[1, 1, 2, 3, 4, 5]
23-
>>> price = [5, 4, 3, 2, 1]
24-
>>> calculation_span(price)
25-
[1, 1, 2, 3, 4]
26-
>>> price = [1, 2, 3, 4, 5]
27-
>>> calculation_span(price)
28-
[1, 2, 3, 4, 5]
29-
>>> price = [10, 20, 30, 40, 50]
30-
>>> calculation_span(price)
31-
[1, 2, 3, 4, 5]
32-
"""
13+
Calculate the span values for a given list of stock prices.
14+
Args:
15+
price (list): List of stock prices.
16+
Returns:
17+
>>> price = [10, 4, 5, 90, 120, 80]
18+
>>> calculation_span(price)
19+
[1, 1, 2, 4, 5, 6]
20+
>>> price = [100, 50, 60, 70, 80, 90]
21+
>>> calculation_span(price)
22+
[1, 1, 2, 3, 4, 5]
23+
>>> price = [5, 4, 3, 2, 1]
24+
>>> calculation_span(price)
25+
[1, 1, 2, 3, 4]
26+
>>> price = [1, 2, 3, 4, 5]
27+
>>> calculation_span(price)
28+
[1, 2, 3, 4, 5]
29+
>>> price = [10, 20, 30, 40, 50]
30+
>>> calculation_span(price)
31+
[1, 2, 3, 4, 5]
32+
"""
3333
n = len(price)
3434
st = [0]
3535
s = [0] * n

0 commit comments

Comments
 (0)