Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Practice] Given map of timestamps to stock prices for a single day... #22

Open
lpatmo opened this issue Jan 22, 2019 · 0 comments
Open

Comments

@lpatmo
Copy link
Member

lpatmo commented Jan 22, 2019

How about this one? Given a map of timestamps to stock prices for a single day, return the best times to have bought and sold them respectively, and the total profit you would have earned.

Note: Yup, a dictionary of timestamps to stock prices, in Python terms you can assume it's like Dict[datetime, float] (that is, if datetimes are allowed as dictionary keys. If not assume they're strings that are easily parsed into datetime)

Assume it's for one day and for one stock

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant