# Best Time to Buy and Sell Stock I,II,III

**Best Time to Buy and Sell Stock I**Say you have an array for which the

*i*th element is the price of a given stock on day

*i*. If you were only permitted to complete at...

Leetcode

`1, 4, 9, 16, ...`

) which sum to `12`

,...
`(`

and closing parentheses `)`

, the plus `+`

or minus s...
`gas[i]`

.
You have a car with an unlimited gas tank and it costs - 3 of 3
- « Previous
- 1
- 2
- 3