Question
In Python, which comparison about Sliding Window is accurate?
- Sliding windows reuse previous work, while restarting each subarray or substring from scratch repeats unnecessary computation.
- There is no practical difference in behavior, performance, or maintainability when Sliding Window is involved.
- The oldest option related to Sliding Window is always the right production choice regardless of workload or context.
- Differences around Sliding Window are mostly cosmetic, so correctness and debugging quality do not really change.
Hint
Focus on the behavior or tradeoff, not just the keyword.
Answer and rationale
Correct answer: A. Sliding windows reuse previous work, while restarting each subarray or substring from scratch repeats unnecessary computation.
Sliding windows reuse previous work, while restarting each subarray or substring from scratch repeats unnecessary computation. This is the comparison that usually separates memorization from understanding.
Track: Python