题库chevron_right分类chevron_right哈希表
key

哈希表

610 道题目
简单: 155中等: 349困难: 106

哈希表 是技术面试里最常出现的能力维度之一。建议先掌握基础题型的边界处理,再逐步过渡到模式识别和复杂度 trade-off。

面试场景

高频考察问题建模、边界条件与口头表达的清晰度。

常见误区

只背模板不解释为什么,容易在追问里失分。

练习策略

每轮练 3-5 题,固定复盘复杂度和可替代解法。

推荐练习顺序

题库

哈希表 题库

先展示一段最适合快速浏览的题目列表,继续滚动时再慢慢续载,避免专题页被长列表一下子拉穿。

慢加载专题题库

适合这类题很多的专题,先扫结构,再逐步深入。

hourglass_bottom滚动续载
search
tune难度

当前展示 24 / 610 道题目

每次续载 24 题
#题目难度
3

无重复字符的最长子串

Find the length of the longest substring without repeating characters using a sliding window and hash map to track state…

中等
12

整数转罗马数字

Convert a given integer to its Roman numeral representation using hash table mapping and decimal place math operations e…

中等
13

罗马数字转整数

Convert a Roman numeral string into an integer using a hash table and mathematical principles to determine value order.

简单
17

电话号码的字母组合

Generate all letter combinations a digit string can represent using backtracking with pruning, leveraging hash table map…

中等
30

串联所有单词的子串

Find all starting indices of substrings in a string that are concatenations of a given list of words.

困难
36

有效的数独

Check if a 9x9 Sudoku board is valid by scanning rows, columns, and sub-boxes with hash lookups, ensuring no duplicates …

中等
37

解数独

Solve the Sudoku puzzle by filling empty cells while respecting Sudoku's rules using array scanning and backtracking.

困难
41

缺失的第一个正数

Identify the smallest missing positive integer in an unsorted array using constant space and linear time scanning techni…

困难
49

字母异位词分组

Group the anagrams in a list of strings using efficient hash table-based methods, focusing on array scanning.

中等
73

矩阵置零

Modify the matrix in place by setting rows and columns to zero when an element is zero.

中等
76

最小覆盖子串

Find the smallest substring of s containing all characters from t using a sliding window with running state updates for …

困难
105

从前序与中序遍历序列构造二叉树

Construct a binary tree using preorder and inorder traversal arrays, leveraging array scanning and hash table lookups.

中等
106

从中序与后序遍历序列构造二叉树

Reconstruct a binary tree from given inorder and postorder arrays using array scanning and hash lookup to optimize recur…

中等
126

单词接龙 II

Find all shortest transformation sequences from beginWord to endWord using a dictionary, leveraging backtracking search …

困难
127

单词接龙

Find the shortest transformation sequence from a start word to an end word, with each word in the sequence differing by …

困难
128

最长连续序列

Find the length of the longest consecutive elements sequence in an unsorted array using array scanning and hash lookup.

中等
133

克隆图

Clone Graph involves cloning a graph using DFS, focusing on graph traversal and neighbor management using hash tables.

中等
138

随机链表的复制

This problem requires copying a linked list where each node has a random pointer in addition to the next pointer.

中等
139

单词拆分

Determine if a string can be fully segmented into dictionary words using array scanning and hash-based lookups for effic…

中等
140

单词拆分 II

Given a string and dictionary, return all possible sentences by adding spaces where each word is in the dictionary.

困难
141

环形链表

Determine if a given linked list contains a cycle using pointer manipulation or hashing, focusing on detecting repeated …

简单
142

环形链表 II

Identify the start of a cycle in a linked list using pointer manipulation, efficiently handling edge cases without modif…

中等
146

LRU 缓存

Implement an efficient LRU Cache using hash table and doubly-linked list to achieve O(1) operations for get and put.

中等
149

直线上最多的点数

Find the maximum number of points on a straight line in a 2D plane using array scanning and hash lookup.

困难

swap_vert在题库框内继续向下滚动,也会自动续载

关联高频模式

LeetCode 哈希表题型题解:610题训练路线