This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# install latest version of docker the lazy way | |
curl -sSL https://get.docker.com | sh | |
# make it so you don't need to sudo to run docker commands | |
usermod -aG docker ubuntu | |
# install docker-compose | |
curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Problem - 1 | |
def maximizeReturn(prices): | |
max_profit = 0 | |
for i in range(len(prices)): | |
for j in range(len(prices)): | |
profit = prices[j] - prices[i] | |
if profit > max_profit and j > i: | |
max_profit = profit | |
return max_profit |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer