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)

Easy problems
No.Problem
0572Subtree of Another Tree
0705Design HashSet
0706Design HashMap

Medium (10)

Medium problems
No.Problem
0187Repeated DNA Sequences
0535Encode and Decode TinyURL
0718Maximum Length of Repeated Subarray
1461Check If a String Contains All Binary Codes of Size K
2261K Divisible Elements Subarrays
0694Number of Distinct IslandsPremium
1062Longest Repeating SubstringPremium
1554Strings Differ by One CharacterPremium
1698Number of Distinct Substrings in a StringPremium
2168Unique Substrings With Equal Digit FrequencyPremium

Hard (12)

Hard problems
No.Problem
0214Shortest Palindrome
1044Longest Duplicate Substring
1147Longest Chunked Palindrome Decomposition
1316Distinct Echo Substrings
1392Longest Happy Prefix
1923Longest Common Subpath
1948Delete Duplicate Folders in System
1960Maximum Product of the Length of Two Palindromic Substrings
2156Find Substring With Given Hash Value
2430Maximum Deletions on a String
0711Number of Distinct Islands IIPremium
2223Sum of Scores of Built Strings

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.