LeetCode MEDIUM 904 Fruit Into Baskets Summary
Generated by Codex with GPT-5
Quick facts
- Difficulty:
MEDIUM - Problem: Fruit Into Baskets
- Main tags:
Array,Hash Table,Sliding Window
What the problem is really asking
The story sounds specific, but the core problem is simple:
find the length of the longest contiguous subarray that contains at most two distinct values.
Continue ...