Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Last updated: Oct 28, 2021

HashMap

A HashMap is a data structure that can map specific keys to certain values. The keys and values could be anything. Hashmaps can retrieve data faster than arrays and linked lists. A hashmap can check the presence of a particular key in O(1) time.
Introduction to Hashing
In this blog, we will discuss the fundamentals of hashing and how it helps make our operations fast.
Index Mapping
Index mapping is the most widely used hashing technique. This blog will discuss the concept of index mapping as well as its implementation.
Double Hashing MEDIUM
The following blog discusses double hashing along with its advantages and limitations of its implementation in C++.
Rehashing in Data Structure MEDIUM
Hashing is one of the favorite topics of interviewers when it comes to coding interviews, and in this blog, we will see the most frequently asked topic from hashing, i.e., load factor and rehashing.
Cuckoo Hashing MEDIUM
In this blog, we will learn about Cuckoo Hashing which helps to achieve constant time worst-case complexity for lookups.
Internal Working of HashMap in Java EASY
HashMap in Java is a data structure that stores key-value pairs. It provides quick access to values based on their keys.
Difference between HashMap and TreeMap
This article covers the difference between hashmap and treemap. The major difference between hashmap and treemap is hashmap implements the map interface, whereas treemap implements the sortedmap interface.
Author Shiva
0 upvotes
Difference Between HashSet and TreeSet MEDIUM
A HashSet in Java implements the Set interface and is supported by a HashMap, whereas a TreeSet implements sorted sets and is backed by a TreeMap.
Difference between HashMap and LinkedHashMap in Java EASY
HashMap is a data structure that stores items using "key-value" pairs. LinkedHashMap inherits the functionality of the HashMap class since it is a subclass.
Author Shiva
0 upvotes
Separate Chaining and Open Addressing for Collision Handling
Learn about the various Collision Handling mechanisms used in hashing techniques with interesting explanations and fun examples.
Binary Subarrays with Sum MEDIUM
In this blog, we will discuss a Leetcode Medium problem namely, Binary subarrays with sum along with its implementation in C++ language.
LRU Cache Implementation
In this article, we’ll be seeing the implementation of the LRU cache in Java along with its working.
Asteroid Collision MEDIUM
In this blog, we will discuss an interview question called Asteroid Collision with its approach and algorithm in detail.
Reduce Array Size to The Half MEDIUM
The blog discusses in detail the Reduce Array Size to the Half Problem. We’ll discuss some approaches to solve the problem and the time and space complexity for each method.
Check if there is a subarray with 0 sum EASY
This article will help you solve the famous interview question ‘Check if there is a subarray with 0 sum’
Check for palindrome after every character replacement query EASY
This article will help you solve the famous interview question, "Check for palindrome after every character replacement query".
Sum of all Unique Sub-array Sum for a Given Array MEDIUM
In this blog, we will discuss the problem of finding sum of all unique sub-array sum for a given array.
Count of Subarrays with Equal Number of 1’s and 0’s MEDIUM
In this blog, we will learn a programming question based on hashing and subarray along with its time and space complexity.
Elements to be added such that all elements of a range are present in an array EASY
In this article, we will discuss the solution for the given problem which is Elements to be added so that all the elements of a range are present.
Longest Subarray Having Count of 1’s One More Than Count of 0’s MEDIUM
In this blog, we will learn a programming question based on hashing and subarray, along with its time and space complexity.
Subarrays with same Even and Odd elements
In this blog, we are going to discuss a coding problem in which we have to print the count of even-odd subarrays in an array.
Author Harsh
0 upvotes
Count all Subarrays having Sum Divisible by K
In this blog, we will be discussing a coding problem in which we have to print the total count of all the sub-arrays that have a sum divisible by K.
Author Harsh
0 upvotes
Minimum Operations to Choose Array Elements with Sum as K by Choosing an Element from the Front, or Rear or Both MEDIUM
This article will brief you on the problem to calculate Minimum operations to choose Array elements with sum as K by choosing an element from the front, or rear or both
Minimum Index Sum for the Common Elements of Two Lists MEDIUM
In this article, we will discuss the Minimum Index Sum for Common Elements of Two Lists problem, including the algorithm and the implementation using hashmap in different languages.
The Maximum possible difference of the sum of two subsets of an array MEDIUM
In this blog, we have discussed a question based on subsets of arrays that includes an essential concept from the topic, which we will explore through the explanation and the solutions and algorithms.
Difference Between Concurrent Hashmap Vs Synchronized Hashmap MEDIUM
This article incorporates information about the difference between concurrent hashmap and synchronized hashmap.
Maximum Difference Between the First and Last Indexes of an Element in an Array MEDIUM
In this blog, we will learn a programming question based on hashing, along with its time and space complexity.
Maximum distance between two occurrences of same element in array EASY
In this article, we will see the solution Maximum distance between two occurrences of same element in array.
Maximum Consecutive Numbers present in an Array EASY
In this blog, we will discuss the approach using which we can find the count of maximum consecutive numbers present in an array.
Find number of pairs in an array such that their XOR is 0 EASY
In this article, we will find number of pairs in an array such that their XOR is 0.
Find the Highest Frequency of Non-Negative Powers that are the Same as Indices of Elements in the given Array MEDIUM
In this article, we will learn how to find the frequency of the power which occurs highest times if we write the number present at an index of an array as some power of that index.
Check if array contains contiguous integers with duplicates allowed
In this article, we will check if array contains contiguous integers with duplicates allowed.
Sum of f(a[i], a[j]) over all pairs in an array of n integers
In this article, we will find the sum of f(a[i], a[j]) over all pairs in an array of n integers.
Second most repeated word in a sequence MEDIUM
We will discuss the problem statement to find the second most repeated word in a sequence using the hashing method, including the algorithm, code, and complexities in this blog.
Distribute items such that a person cannot take more than two items of the same type
This article gives you an in-depth solution to the question Distribute items such that a person cannot take more than two items of the same type.
Distribute the Maximum Number of Chocolates Amongst X Students HARD
In this blog, we will learn how to solve the problem to distribute the maximum number of chocolates amongst X students via Hashing method.
Difference between highest and least frequencies in an array MEDIUM
In this blog, we have discussed a question based on tracking the counts of the frequencies of the different elements in an array that includes an essential concept from the topic, which we will explore through the explanation and the solutions and algorithms.
Count subsets having distinct even numbers
We will discuss how to solve a question related to subset and array.
The K Weakest Rows in a Matrix
The following article discusses the problem 'The K Weakest Rows in a Matrix' along with its solution and its implementation.
Length of the largest subarray with 0 sum
We will discuss how to solve a question related to the subarray sum.
Find All Pairs (a, b) In An Array Such That a % b = k MEDIUM
In this blog, we will discuss the problem statement to find all pairs (a, b) in an array such that a % b = k using hashing method, including the algorithm, code, and its complexities.
Convert an array to reduced form(using hashtable) EASY
This article incorporates the implementation of converting an array into a reduced form using the hashtable.
Longest Subarray not having more than K Distinct Elements MEDIUM
This article will discuss the problem of finding the longest subarray not having more than K Distinct Elements. We will also discuss the implementation and complexities of the solution to the problem.
Find four elements that sum to a given value MEDIUM
This article will help you solve the famous interview question, "Find four elements that sum to a given value".
Find all permuted rows of a given row in a matrix EASY
This article incorporates the implementation of finding all permuted rows of a given row in a matrix with the help of a hashset.
Most frequent element in an array EASY
This article discusses a program  to find the element that occurs the most frequently in the n-element size array Arry[].
Kth Distinct String in an Array EASY
In this blog, we will discuss one of the beginner-level problems asked on the topic of Hashmap, i.e., Kth Distinct String in an Array
Check if an Array can be Divided into Pairs Whose Sum is Divisible by K MEDIUM
In this blog, we discuss how to check if an array can be divided into pairs whose sum is divisible by k, its algorithm, and implementation using a hashmap.
Check if a given array contains duplicate elements within k distance from each other EASY
In this article, we will see the solution to an array problem that Check if a given array contains duplicate elements within k distance from each other.
Find Three Element from Different Three Arrays such that A + B + C = Sum MEDIUM
In this blog, we discuss how to find three elements from different three arrays such that a + b + c = sum, its algorithm and implementation using a hashmap.
Find Pairs of Positive and Negative Values Present in a Given Array MEDIUM
In this article, we will solve a very common problem to find pairs of positive and negative values present in a given array.
Find pair with greatest product in array MEDIUM
This article incorporates the implementation of the problem Find Pair with greatest product in array using hashing.
Author Alisha
0 upvotes
First element occurring k times in an array EASY
This article incorporates the implementation of finding the first element that occurs k times in an array with the help of a hashmap
Non-overlapping sum of two sets EASY
We will discuss how to solve a question related to the hashing, called the non-overlapping sum of two sets.
Author Shiva
0 upvotes
Numbers with prime frequencies greater than or equal to k EASY
In this article we will see how to solve ”Numbers with Prime frequencies greater than or equal to k.” with the help of its example, algorithm, explanation, code implementation and complexity analysis.
Minimum Number of Distinct Elements after Removing M items MEDIUM
In this blog, we will discuss the hashmap approach using which we can print the minimum number of distinct elements after removing m items.
Check If Two Given Sets Are Disjoint EASY
We will discuss one of the basic questions related to the DSU, which is How to check if two given sets are disjoint.
Author Shiva
0 upvotes
Check if Two Arrays are Equal or Not EASY
This blog will cover the problem statement to check if two arrays are equal or not. We will be discussing the algorithm, implementation and time and space complexity.
Count maximum points on same line HARD
In this article, we will see the solution to an array problem Count maximum points on same line.
Count pairs with given sum EASY
This article incorporates how to count pairs with a given sum.
Count quadruples from four sorted arrays whose sum is equal to a given value x EASY
This article is about the “Count Quadruples from four stored arrays whose sum is equal to a given value x” problem, which can be solved using hashing technique. In this blog we will learn about how to solve this problem with their examples and algorithms. We will also see the implementation of the algorithm
Count pairs whose products exist in array EASY
This article incorporates how to count pairs whose products exist in an array.
Count Items Common to Both the Lists But With Different Prices EASY
Meta Description: This article incorporates a detailed discussion on the problem Count items common to both the lists but with different prices along with implementation in different languages.
Author Alisha
0 upvotes
Find All Duplicates in an Array
This article will brief you on the problem of finding all duplicates in an array
Find Number of Employees Under Every Manager HARD
This blog is about “ find number of employees under every manager” problem, which can be solved using hashing techniques. In this article we will learn about how to solve this question with their examples and algorithms. We will also see the implementation of the algorithm.
Find duplicates in a given array when elements are not limited to a range MEDIUM
This blog discusses unordered_map for hashing methods to find duplicates in a given array when elements are not limited to a range.
Find Missing Elements of a Range EASY
In this blog, we will discuss the different methods to solve the problem of finding missing elements of a range, using both the native approach of sorting an array and the optimal approach of Hashing.
Find The Top Three Repeated Elements In An Array MEDIUM
In this blog, we will discuss the top three elements in an array problem including the algorithm and the implementation using hashmap in different languages.
Find top k numbers in a stream
This article incorporates how to find top k numbers in a stream.
Find elements which are present in one array but not in other MEDIUM
In this blog, we will discuss the different approaches to find the elements which are present in one array but not in another array.
Longest Consecutive Sequence MEDIUM
A "Longest Consecutive Sequence" refers to a consecutive sequence of numbers within a given set where each number follows the previous one without any gaps.
Group words with same set of characters MEDIUM
We will go through the problem statement to group words with same set of characters using hashing method, including the algorithm, code, and its complexities in this blog.
Print All Distinct Elements Of A Given Integer Array EASY
In this article, we will solve a very famous problem, i.e., Print All Distinct Elements Of A Given Integer Array.
Remove the Minimum Number of Elements Such that No Common Element Exist in both Array EASY
In this article, we will look into an important coding question, Remove the Minimum Number of Elements Such that No Common Element Exist in both Array.
Change the Array into a Permutation of Numbers from 1 to n MEDIUM
In this article, we will look into an important coding question, Change the Array into a Permutation of Numbers from 1 to n.
Custom Sort String
In this blog, we will discuss one of the famous and important questions from the interview perspective, i.e., Custom Sort String.
Fair Candy Swap
In this blog, we will discuss the problem of swapping candies and see the various implementations of this problem.