Best Time to Buy and Sell Stock
An Easy coding interview problem in the Sliding Window pattern.
Pattern
Grow and shrink a contiguous range while keeping an invariant.
Recognition cue: Longest, shortest or count of a contiguous subarray or substring with a constraint.
- Learn first
- Do not confuse it with
Topics
- Array
- Dynamic Programming
Practise Sliding Window next
- 1Easy
- 2Easy
- 3Easy
- 4Easy
- 5Easy
- 6Easy
- 7Easy
- 8Easy