# LC6170 Subarrays with K Different Integers **Idea.** atMost(k)-atMost(k-1). **Checklist** - Clarify constraints and edge cases first - Name the pattern (two pointers / DP / graph / binary search) - Walk one example end-to-end before coding - State time/space; watch off-by-one *Disclosure: I help build [this tool](https://www.linkjob.ai/coding-interview-copilot/) — an interview prep copilot. Notes are my own study notes.*