904. Fruit Into Baskets
Input: [1,2,1]
Output: 3
Explanation: We can collect [1,2,1].Input: [0,1,2,2]
Output: 3
Explanation: We can collect [1,2,2].
If we started at the first tree, we would only collect [0, 1].Input: [1,2,3,2,2]
Output: 4
Explanation: We can collect [2,3,2,2].
If we started at the first tree, we would only collect [1, 2].Last updated