DSA · INTERVIEW & OA PREP
Hash maps turn many O(n²) scans into O(n), and two pointers exploit sorted or paired structure. Together they solve a huge fraction of medium problems — recognising when to reach for each is the real skill.
If a problem asks 'has this been seen before' or 'how many times', a hash map is almost always the intended tool.
Assuming hash operations are always O(1) — worst case is O(n) with bad hashing; mention it if asked.
Three tap-only questions to test your recall on this topic.
Ready to apply? Browse live internships and sharpen your resume first.