<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Leetcode on Compile My Mind</title>
		<link>https://www.compilemymind.com/tags/leetcode/</link>
		<description>Recent content in Leetcode on Compile My Mind</description>
		<generator>Hugo</generator>
		<language>en</language>
		
		
		
		
			<lastBuildDate>Mon, 20 Jul 2026 19:30:00 +0300</lastBuildDate>
		
			<atom:link href="https://www.compilemymind.com/tags/leetcode/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>LeetCode Two Sum: From Brute Force to a Hash Map</title>
				<link>https://www.compilemymind.com/posts/leetcode-two-sum-brute-force-hash-map/</link>
				<pubDate>Mon, 20 Jul 2026 07:06:49 +0300</pubDate>
				<guid>https://www.compilemymind.com/posts/leetcode-two-sum-brute-force-hash-map/</guid>
				<description>&lt;p&gt;Two Sum asks for two distinct input positions whose values add to a target. The compact solution is often presented as a memorized hash-map trick, but the important reasoning is the complement equation: when the current value is x, the required earlier value is target minus x. From that observation, the implementation choice becomes a tradeoff between repeated search, sorting, and indexed lookup.&lt;/p&gt;&#xA;&lt;p&gt;&lt;figure&gt;&#xA;    &lt;img src=&#34;https://www.compilemymind.com/posts/leetcode-two-sum-brute-force-hash-map/concept-flow.svg&#34; alt=&#34;Two Sum solution progression from brute force to hash map&#34; width=&#34;1200&#34; height=&#34;830&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34;&gt;&#xA;    &#xA;  &lt;/figure&gt;&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
