dsa5 min read
Hashing & Maps — Complete Guide (Problems 161–205)
Master HashMap, HashSet, and cache design patterns with 45 problems, 5-language solutions, and MAANG company tags.
Read →
1575 articles
Master HashMap, HashSet, and cache design patterns with 45 problems, 5-language solutions, and MAANG company tags.
Find two indices that add to target in O(n) by storing each number in a HashMap and looking up the complement.
Check if two strings are anagrams by comparing their character frequency counts using an array or HashMap.
Check if a ransom note can be constructed from magazine letters using a character frequency map.
Check if two strings are isomorphic by maintaining bidirectional character mappings to ensure a consistent one-to-one correspondence.