You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: