Made compatible for all versions of python

This commit is contained in:
S-Sanyal 2018-10-03 21:52:30 +05:30
parent c74b2732d9
commit 054b4b31f4
2 changed files with 4 additions and 0 deletions

3
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,3 @@
{
"python.pythonPath": "/usr/bin/python3"
}

View File

@ -6,6 +6,7 @@ The span Si of the stocks 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
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):
n = len(price)