<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>哈希表 on Jeanphilo Blog</title><link>https://jeanphilogong.github.io/jeanblog/zh/tags/%E5%93%88%E5%B8%8C%E8%A1%A8/</link><description>Recent content in 哈希表 on Jeanphilo Blog</description><generator>Hugo -- 0.168.0</generator><language>zh-cn</language><lastBuildDate>Sat, 10 Oct 2026 10:00:00 +0800</lastBuildDate><atom:link href="https://jeanphilogong.github.io/jeanblog/zh/tags/%E5%93%88%E5%B8%8C%E8%A1%A8/index.xml" rel="self" type="application/rss+xml"/><item><title>LeetCode 1282：用户分组，从相同容量分桶到满组即输出</title><link>https://jeanphilogong.github.io/jeanblog/zh/alg/leetcode/1282-group-the-people-given-the-group-size-they-belong-to/</link><pubDate>Sat, 10 Oct 2026 10:00:00 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/zh/alg/leetcode/1282-group-the-people-given-the-group-size-they-belong-to/</guid><description>从用户编号与组大小的区别出发，先按容量收集再分块，逐步写出满组即输出的 Python 解法，解释列表引用陷阱、正确性与线性复杂度。</description></item><item><title>LeetCode 49：字母异位词分组，从逐组比较到构造分组键</title><link>https://jeanphilogong.github.io/jeanblog/zh/alg/leetcode/hot100/49-group-anagrams/</link><pubDate>Sat, 10 Oct 2026 10:00:00 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/zh/alg/leetcode/hot100/49-group-anagrams/</guid><description>用 Python 从两个字符串的异位词判断出发，先写出逐组扫描的正确解，再推导排序键与字符计数键，理解哈希表分组为什么成立。</description></item><item><title>LeetCode 609：在文件系统中查找重复文件，从解析记录到按内容分组</title><link>https://jeanphilogong.github.io/jeanblog/zh/alg/leetcode/609-find-duplicate-file-in-system/</link><pubDate>Sat, 10 Oct 2026 10:00:00 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/zh/alg/leetcode/609-find-duplicate-file-in-system/</guid><description>逐步解决 LeetCode 609：解析目录与文件描述，写出两两比较的正确基线，再按内容哈希分组，并分析路径拼接成本和真实文件系统的边界。</description></item><item><title>Hot100：从前序与中序遍历序列构造二叉树（Construct Binary Tree from Preorder and Inorder Traversal）索引分治 ACERS 解析</title><link>https://jeanphilogong.github.io/jeanblog/zh/alg/leetcode/hot100/binary-tree/105-construct-binary-tree-from-preorder-and-inorder-traversal/</link><pubDate>Mon, 20 Apr 2026 09:37:25 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/zh/alg/leetcode/hot100/binary-tree/105-construct-binary-tree-from-preorder-and-inorder-traversal/</guid><description>围绕 LeetCode 105 讲清前序负责定根、中序负责切左右的分工，以及如何用索引区间和哈希表把构树复杂度降到 O(n)。</description></item><item><title>克隆图：哈希表 + DFS/BFS 实现无向图深拷贝（LeetCode 133）</title><link>https://jeanphilogong.github.io/jeanblog/zh/alg/leetcode/133-clone-graph/</link><pubDate>Thu, 19 Mar 2026 13:18:26 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/zh/alg/leetcode/133-clone-graph/</guid><description>用原节点到新节点的映射表实现无向连通图深拷贝，覆盖 DFS 与 BFS 两种写法、环处理、正确性分析与多语言可运行实现。</description></item><item><title>LeetCode 146：LRU 缓存设计（O(1)）哈希表 + 双向链表实战</title><link>https://jeanphilogong.github.io/jeanblog/zh/alg/leetcode/hot100/linked-list/146-lru-cache/</link><pubDate>Wed, 11 Feb 2026 08:02:05 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/zh/alg/leetcode/hot100/linked-list/146-lru-cache/</guid><description>LRUCache 的核心是用哈希表做 O(1) 定位、双向链表维护最近使用顺序，实现 get/put 平均 O(1)。本文按 ACERS 模板给出推导、工程应用与多语言代码。</description></item><item><title>LeetCode 138：随机链表的复制（Copy List with Random Pointer）深拷贝全解析</title><link>https://jeanphilogong.github.io/jeanblog/zh/alg/leetcode/hot100/linked-list/138-copy-list-with-random-pointer/</link><pubDate>Wed, 11 Feb 2026 07:59:32 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/zh/alg/leetcode/hot100/linked-list/138-copy-list-with-random-pointer/</guid><description>随机链表复制的核心是把“原节点身份”映射到“新节点身份”，再重建 next/random 指针。本文用 ACERS 结构给出思路推导、工程类比、常见坑和多语言可运行实现。</description></item><item><title>Hot100：路径和 III 前缀和 + 哈希表统计向下路径（LeetCode 437）ACERS 解析</title><link>https://jeanphilogong.github.io/jeanblog/zh/alg/leetcode/hot100/binary-tree/437-path-sum-iii/</link><pubDate>Mon, 02 Feb 2026 22:13:45 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/zh/alg/leetcode/hot100/binary-tree/437-path-sum-iii/</guid><description>用前缀和 + 计数哈希表在 O(n) 时间统计二叉树中和为 targetSum 的向下路径数，含推导、工程迁移与多语言实现。</description></item><item><title>LeetCode 76：最小覆盖子串（Minimum Window Substring）滑动窗口 ACERS 解析</title><link>https://jeanphilogong.github.io/jeanblog/zh/alg/leetcode/hot100/76-minimum-window-substring/</link><pubDate>Tue, 20 Jan 2026 21:59:19 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/zh/alg/leetcode/hot100/76-minimum-window-substring/</guid><description>用可变滑动窗口与计数哈希表在 O(n) 时间找到最小覆盖子串，含工程场景与多语言实现。</description></item><item><title>Hot100：和为 K 的子数组（Subarray Sum Equals K）前缀和 + 哈希表 ACERS 解析</title><link>https://jeanphilogong.github.io/jeanblog/zh/alg/leetcode/hot100/560-subarray-sum-equals-k/</link><pubDate>Sat, 17 Jan 2026 20:49:25 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/zh/alg/leetcode/hot100/560-subarray-sum-equals-k/</guid><description>用前缀和与哈希表在 O(n) 时间统计和为 K 的子数组数量，含工程场景、多语言实现与常见误区。</description></item><item><title>数据结构基础：好数对计数（Number of Good Pairs）哈希统计 ACERS 解析（LeetCode 1512）</title><link>https://jeanphilogong.github.io/jeanblog/zh/alg/leetcode/1512-number-of-good-pairs/</link><pubDate>Tue, 30 Dec 2025 11:40:00 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/zh/alg/leetcode/1512-number-of-good-pairs/</guid><description>用哈希计数一遍扫描解决好数对（Good Pairs）问题，附工程场景、复杂度对比与多语言实现。</description></item><item><title>Hot100：Two Sum 两数之和哈希表一遍扫描与 ACERS 工程化解析（LeetCode 1）</title><link>https://jeanphilogong.github.io/jeanblog/zh/alg/leetcode/hot100/1-two-sum/</link><pubDate>Sun, 28 Dec 2025 10:00:00 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/zh/alg/leetcode/hot100/1-two-sum/</guid><description>从题意还原到哈希表一遍扫描，系统讲解 Two Sum，并给出工程场景、复杂度对比与多语言实现。</description></item><item><title>固定长度子数组 + 至少 m 个不同元素：几乎唯一子数组的最大和（LeetCode 2841）</title><link>https://jeanphilogong.github.io/jeanblog/zh/alg/leetcode/2841-maximum-sum-of-almost-unique-subarray/</link><pubDate>Thu, 04 Dec 2025 10:40:00 +0800</pubDate><guid>https://jeanphilogong.github.io/jeanblog/zh/alg/leetcode/2841-maximum-sum-of-almost-unique-subarray/</guid><description>给定整数数组 nums 和正整数 m、k，要求在所有长度为 k、且至少包含 m 个不同元素的子数组中，找到最大和；若不存在返回 0。本文用滑动窗口 + 计数哈希表推导 O(n) 解法，并提供多语言实现与工程应用示例。</description></item></channel></rss>