mirror of
https://hub.njuu.cf/TheAlgorithms/Python.git
synced 2023-10-11 13:06:12 +08:00
Made compatible for all versions of python
This commit is contained in:
parent
c74b2732d9
commit
054b4b31f4
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"python.pythonPath": "/usr/bin/python3"
|
||||||
|
}
|
@ -6,6 +6,7 @@ The span Si of the stock’s price on a given day i is defined as the maximum
|
|||||||
number of consecutive days just before the given day, for which the price of the stock
|
number of consecutive days just before the given day, for which the price of the stock
|
||||||
on the current day is less than or equal to its price on the given day.
|
on the current day is less than or equal to its price on the given day.
|
||||||
'''
|
'''
|
||||||
|
from __future__ import print_function
|
||||||
def calculateSpan(price, S):
|
def calculateSpan(price, S):
|
||||||
|
|
||||||
n = len(price)
|
n = len(price)
|
||||||
|
Loading…
Reference in New Issue
Block a user