Skip to content

theghall/stock_picker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

This pretends to know the stock prices over a period of time. It will pick the quickest route to profit if there is one (It will catch the case if the price does not rise over the period. This went a little beyond what the project asked for as it does not just find the first pair of days to buy/sell, but also handles if there is more than one day with the max price. So, for 1,7,1,1,7 the output will be:

For quickest profit buy on day 1 at $1/share and sell on day 2 at $7/share

Other days to buy/sell Buy on day 3 at $1/share and sell on day 5 at $7/share (should not report this but I need to move on) Buy on day 4 at $1/share and sell on day 5 at $7/share

When run it will ask you to input a comma-delimited list of stock prices.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages