From 054b4b31f42a2bfe5dafed66fa88cb477aa63098 Mon Sep 17 00:00:00 2001 From: S-Sanyal Date: Wed, 3 Oct 2018 21:52:30 +0530 Subject: [PATCH] Made compatible for all versions of python --- .vscode/settings.json | 3 +++ data_structures/Stacks/Stock-Span-Problem.py | 1 + 2 files changed, 4 insertions(+) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000..615aafb03 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "python.pythonPath": "/usr/bin/python3" +} \ No newline at end of file diff --git a/data_structures/Stacks/Stock-Span-Problem.py b/data_structures/Stacks/Stock-Span-Problem.py index 2081166bb..f64c712bb 100644 --- a/data_structures/Stacks/Stock-Span-Problem.py +++ b/data_structures/Stacks/Stock-Span-Problem.py @@ -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 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)