Last active
August 8, 2020 08:27
-
-
Save barthflo/0ccdf17aa1266c5a774528dee07e291a to your computer and use it in GitHub Desktop.
Created a pseudo-code algorithm
This file contains 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
start maxBuy (real money, real price) | |
int maxBuy ← 0 | |
IF money AND price > 0 | |
As long as money >= price | |
money ← money - price | |
maxBuy ← maxBuy+1 | |
End As long as | |
End IF | |
return maxBuy | |
end maxBuy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment