Untitled
unknown
python
3 years ago
246 B
9
Indexable
def StockPicker(arr):
highest_profit = -1
for i in range(len(arr)-1):
for j in range(i+1, len(arr)):
if arr[j] - arr[i] > highest_profit:
highest_profit = arr[j] - arr[i]
return highest_profitEditor is loading...