<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Hash-Tables on Algorithms in 60 Days</title><link>https://algorithmsin60days.com/tags/hash-tables/</link><description>Recent content in Hash-Tables on Algorithms in 60 Days</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Fri, 10 Jul 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://algorithmsin60days.com/tags/hash-tables/index.xml" rel="self" type="application/rss+xml"/><item><title>Hashing: A Study Guide</title><link>https://algorithmsin60days.com/topics/hashing/</link><pubDate>Fri, 10 Jul 2026 00:00:00 +0000</pubDate><guid>https://algorithmsin60days.com/topics/hashing/</guid><description>&lt;p&gt;Hashing turns a key into an array index by running it through a hash function, so a &lt;strong&gt;hash table&lt;/strong&gt; can store and retrieve values in expected constant time. Python&amp;rsquo;s &lt;code&gt;dict&lt;/code&gt; and &lt;code&gt;set&lt;/code&gt; are hash tables. That average O(1) lookup is the single most useful tool in interview problem solving: an enormous fraction of &amp;ldquo;make it faster than brute force&amp;rdquo; questions come down to &amp;ldquo;put it in a hash map.&amp;rdquo;&lt;/p&gt;

&lt;h2 id="why-hashing-matters"&gt;Why Hashing Matters&lt;a class="header-anchor" href="#why-hashing-matters" aria-label="Permalink to this heading"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The pattern is almost mechanical. A nested loop that checks every pair is O(n^2); a hash map that remembers what you have already seen makes it O(n). Two Sum, group anagrams, subarray sum equals k, first unique character, and detecting duplicates are all this trade: spend O(n) memory to buy O(n) time. Recognizing when to swap a scan for a lookup is a core interview skill.&lt;/p&gt;</description></item></channel></rss>