×
Home Discussions Write at Opengenus IQ
×
  • DSA Cheatsheet
  • HOME
  • Track your progress
  • Deep Learning (FREE)
  • Join our Internship 🎓
  • RANDOM
  • One Liner

hash map

A collection of 22 posts

Java

Hash Map in Java using OOP concepts and Generics

In this article at OpenGenus, we will implement Hash Map in Java using OOP concepts and Generics.

Manish Singh
Algorithms

Minimum Deletions to Make Array Divisible [3 Solutions]

In this article, we will explore how we can get the minimum number of deletion of smallest element such that the smallest element in the first array divides all the elements in the second array. This will involve the concept of Min Heap and Hash Map.

Aswin Shailajan
Algorithms

Longest Consecutive Subsequence [3 solutions]

In this article, we have solved the problem of Longest Consecutive Subsequence using the concept of Hash Map and Union Find.

Aswin Shailajan
Algorithms

Largest sub-array with equal number of 1 and 0

In this article, we have explored 3 different approaches to find the Largest sub-array with equal number of 1 and 0. This involve the concept of Hash Map/ Set and Prefix Sum.

Bhavani Sankar Nagarapu Bhavani Sankar Nagarapu
Algorithms

Magic Dictionary Problem [Solved]

In this article we are going to discuss a famous Leetcode medium level problem called "Implement Magic Dictionary" problem. This will involve the concept of Hash Table/ Map and Tries.

Harshit Raj
Algorithms

Separate chaining collision resolution technique

In this article, we are going to see how we can actually resolve the collisions which happen during hash mapping using Separate chaining collision resolution technique.

Rahul Kumar Yadav
Time Complexity

Time and Space Complexity of Hash Table operations

This article covers Time and Space Complexity of Hash Table (also known as Hash Map) operations for different operations like search, insert and delete for two variants of Hash Table that is Open and Closed Addressing.

J. Varun Iyer J. Varun Iyer
Algorithms

Distributed Hash Table

In this article, we discuss hash tables and their implementations on a larger scale while maintaining its computational complexity that is Distributed Hash Table.

Erick Lumunge
Data Structures

All O`one Data Structure

In this post, we will design a Data Structure that returns the string occurring maximum and minimum times in constant time O(1). This will use a hashmap and a doubly linked list utilizing the advantages of each to solve the problem.

Erick Lumunge
Algorithms

4 Sum problem

In this article, we have explored an insightful approach/ algorithm to find the 4 elements in an array whose sum is equal to the required answer (4 Sum problem). This concept finds many uses in computational geometry.

Rohan Chandrashekar Rohan Chandrashekar
Algorithms

Longest substring without repeating characters

In this article, we have explained three approaches to the problem of finding Longest substring without repeating characters. This involves the use of Hash Map with the clever use of start and end index.

Akanksha Singh
Algorithms

Intersection of two arrays

We have explored several approaches to find Intersection of two arrays efficiently. This involve techniques like sorting, binary search, hash map and much more.

Akanksha Singh
Algorithms

Longest Increasing Consecutive Subsequence

We have to find the Longest Increasing Consecutive Subsequence in N elements. We can solve this problem efficiently using Dynamic Programming in O(N) time.

Vikram Shishupalsingh Bais Vikram Shishupalsingh Bais
Algorithms

Number of Substrings with distinct characters

We have explored various algorithms that will help us in determining the number of substrings that a string can have with distinct characters.

Vansh Pratap Singh Vansh Pratap Singh
Algorithms

Least frequent element in an array

Given an array of N elements, our task is to find the least frequent element present in it. In this article, we are going to talk about 3 methods to solve this problem along with their implementation.

Vansh Pratap Singh Vansh Pratap Singh
Algorithms

Finding 2 elements with difference k in a sorted array

This article discusses how to check the existence of and find 2 elements with difference k in sorted array. We have explored 3 approaches and solved it in linear time O(N).

Varul Srivastava
Algorithms

3 Sum problem (Triplets with given Sum)

Given an array, we need to find if there is a triplet in the array whose sum is equal to a given value. If such a triplet is present, we need to print it and return true. Else, return false.

Amruta U. Koshe Amruta U. Koshe
Algorithms

2 Sum Problem: Number of pairs with a given sum

We will find out how we can count the number of pairs in an array whose sum is equal to a certain number. Brute force approaches will take O(N^2) time but we can solve this in O(N) time using a Hash Map.

Sourajeet Mohanty Sourajeet Mohanty
Algorithms

Finding number of pairs with a certain XOR value

In this article, we are going to find the number of pairs in an unsorted array, whose XOR values matches with our target value (say K). Using our efficient approach (with Hash map), we can solve this in O(N) time complexity while the brute force approach takes O(N^2) time complexity

Sourajeet Mohanty Sourajeet Mohanty
Algorithms

Implement Least Recently Used (LRU) Cache

In this article, we have implemented Least Recently Used cache using 2 data structures: Doubly Linked Lists and Hash Map and compared LRU with FIFO cache.

Tanmay Maheshwari Tanmay Maheshwari
Data Structures

Hash Map / Hash table

Hash map (hash table, unordered map, dictionary, hash set) is a widely used efficient data structure that used to store data which can be searched in constant time O(1). This data structure is implemented over an array that maps keys to values that is it is a set of key value pairs.

Yao Yao Yao Yao
Software Engineering

HashMap in Java

In Java, HashMap is a Map based collection class that is used for storing Key and value pairs which is denoted as HashMap. It does not maintain order of elements, allows one null key, multiple null values, is not thread safe, default size is 16, default load factor is 0.75 JDK1.7, JDK1.8

Yilin WU
OpenGenus IQ © 2025 All rights reserved â„¢
Contact - Email: team@opengenus.org
Primary Address: JR Shinjuku Miraina Tower, Tokyo, Shinjuku 160-0022, JP
Office #2: Commercial Complex D4, Delhi, Delhi 110017, IN
Top Posts LinkedIn Twitter
Android App
Apply for Internship