Hash Function LeetCode Problems: All 25,
With Python Solutions
Every problem in this library that LeetCode tags Hash Function. 18 of them carry a complete Python solution, a worked example and the time and space complexity of the approach.
- Easy
- 3
- Medium
- 10
- Hard
- 12
Hash Function problems by difficulty
Problems with a complete Python solution are listed first, then by ascending problem number.
Easy (3)
| No. | Problem | Topics |
|---|---|---|
| 0572 | Subtree of Another Tree | |
| 0705 | Design HashSet | |
| 0706 | Design HashMap |
Medium (10)
| No. | Problem | Topics |
|---|---|---|
| 0187 | Repeated DNA Sequences | |
| 0535 | Encode and Decode TinyURL | |
| 0718 | Maximum Length of Repeated Subarray | |
| 1461 | Check If a String Contains All Binary Codes of Size K | |
| 2261 | K Divisible Elements Subarrays | |
| 0694 | Number of Distinct IslandsPremium | |
| 1062 | Longest Repeating SubstringPremium | |
| 1554 | Strings Differ by One CharacterPremium | |
| 1698 | Number of Distinct Substrings in a StringPremium | |
| 2168 | Unique Substrings With Equal Digit FrequencyPremium |
Hard (12)
Eyes only
When the Hash Function problem arrives live.
In the live round, Stealth Interview reads the problem off your screen, returns a working solution with a step-by-step explanation and its time and space complexity, and transcribes what the interviewer says. It's a desktop app for macOS and Windows, invisible to screen sharing.
Keep exploring
Other topics
- Array1,569
- String672
- Hash Table588
- Math485
- Dynamic Programming481
- Sorting392
- Greedy346
- Depth-First Search289
- Binary Search253
- Database249
- Tree225
- Breadth-First Search223
- Matrix216
- Two Pointers201
- Bit Manipulation194
- Binary Tree174
- Heap (Priority Queue)163
- Prefix Sum157
- Stack157
- Simulation144
- Graph138
- Counting126
- Design122
- Sliding Window116