Day 13/75: Unordered map patterns
75 Day DSA in C++ Challenge
Today I focused on using unordered_map and unordered_set deliberately instead of treating them like magic storage. The strongest checkpoints were make the key and the stored meaning explicit before the unordered_map or unordered_set starts growing, update the hash state in the right order so the answer check stays correct, and use unordered_map or unordered_set for a defined reason instead of by reflex.
The mistake I wanted to avoid was building the right unordered_map or set but updating it in the wrong order. The day felt better once the invariant stayed visible and each update had one job.
The goal for tomorrow is simple: keep the rule clear enough that the next variation still feels related to the same idea. I also want to keep tracing tiny examples because they expose weak assumptions faster than large random tests.
Top comments (0)