Future Stock Prices
Problem Overview
- Compute max profit from $1,000 given future stock prices.
- Input: unordered [Stock, Date, Price] list; Output: int profit rounded to nearest dollar.
- Rules: fractional shares, instant no-fee trades, trade only on known dates, no short selling, cash-only periods allowed.
- Stock trading domain; a coding interview interview question problem from Hudson_river interviews.
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Input Variables
Execution Result:
