Hashing and hash maps interview questions
7 questions on this data structure, most asked first. Reported by candidates in public interview write-ups and reworded by Scrivio. How the reports are counted
Your progress: 0 of 7 done, 0 saved
Find the first character in a string that does not repeat.
Reported 35 times
Read the solutionArrays and hashingExample sources
3 of the write-ups counted: geeksforgeeks.org 2024, geeksforgeeks.org 2023, geeksforgeeks.org 2018
Count the pairs of elements in an array that add up to a target sum.
Reported 34 times
Read the solutionArrays and hashingExample sources
3 of the write-ups counted: geeksforgeeks.org 2023, geeksforgeeks.org 2020, geeksforgeeks.org 2020
Group the words of a list so that anagrams are together.
Reported 28 times
Read the solutionArrays and hashingExample sources
3 of the write-ups counted: geeksforgeeks.org 2020, geeksforgeeks.org 2021, geeksforgeeks.org 2019
Identify the values that occur more than once in an array.
Reported 22 times
Read the solutionArrays and hashingExample sources
3 of the write-ups counted: geeksforgeeks.org 2023, geeksforgeeks.org 2026, geeksforgeeks.org 2020
Determine whether an array has two elements whose sum is K, and return them.
Reported 19 times
Read the solutionArrays and hashingExample sources
3 of the write-ups counted: geeksforgeeks.org 2013, geeksforgeeks.org 2017, geeksforgeeks.org 2017
Explain an algorithm that counts how often each element appears in an array.
Reported 16 times
Read the solutionArrays and hashingExample sources
3 of the write-ups counted: geeksforgeeks.org 2020, geeksforgeeks.org 2023, geeksforgeeks.org 2025
What is a hash function and what makes a good one?
Reported 15 times
Read the solutionData structure basicsExample sources
3 of the write-ups counted: geeksforgeeks.org 2016, geeksforgeeks.org 2021, geeksforgeeks.org 2020