HashingEvidence Contributing
Hashmap Existence / Complement Lookup
Use a hashmap or set purely to answer 'have I seen this before' or 'does the complement exist', not to count occurrences.
Practice Problems: 6
Difficulty: 3 Easy·3 Medium·0 Hard
Core technique
Review the technique, then try the mapped problems below. The right approach depends on each problem's constraints.
- Core Strategy: Use a hashmap or set purely to answer 'have I seen this before' or 'does the complement exist', not to count occurrences.