Best Time to Buy and Sell Stock (Return Indices)
Given an integer array prices where prices[i] is the stock price on day i. You may buy on one day and sell on a later day (buy index must be strictly less than sell index). Return the buy and sell...
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Standard Input
Execution Result:
