Fundamental Algorithms8 sections · 291 units
Open in CourseQuiz: At Most K Pattern
Test your understanding
Check Your Understanding
To count subarrays with exactly distinct elements, why compute atMost() - atMost()?
- A.It's faster than counting directly
- B.Counting 'exactly ' directly is complex; 'at most' has simpler window logic
- C.Direct counting requires
- D.It reduces memory usage