Skip to content

Tag Archives: Java-HashMap

Given an integer array arr[]. Create a new array which is a rotation of given array and find the maximum Hamming distance between both the… Read More
Given an array A of size N and an integer B, the task is to find all unique quadruplets arranged in the lexicographically increasing order… Read More
Given a Binary Tree consisting of N nodes, the task is to first compress the tree diagonally to get a list of integers and then,… Read More
Here we will be discussing out how we can, we improve the performance while using HashMap in Java, the Importance of the hashCode() contract and… Read More
Given a 2D array arr[][], representing width of bricks of the same height present on a wall, the task is to find the minimum number… Read More
Given an array arr[] consisting of N integers and an integer K, the task is to print all possible unique quadruplets (arr[i], arr[j], arr[k], arr[l])… Read More
JSON is an open standard file format, and easier data interchange format helpful for humans to transmit data. Most of the apps display JSON data… Read More
Given an integer N, the task is to check whether the given number is a pangram or not. Note: A Pangram Number contains every digit [0-… Read More
HashMap<Key, Value> provides the basic implementation of the Map interface of Java and import java.util.HashMap package or its superclass. HashMap stores the data in (Key,… Read More
Given an array A[] consisting of N integers and an integer K, the task is to count the minimum number of distinct elements present in… Read More
Remember while we were converting octal to decimal we were taking 3 binary digits at a time. A similar approach will be used where here… Read More
Given an array, arr[] representing a permutation of first N natural numbers in the range [1, N], the task for each ith index is to… Read More
HashMap<K, V> is a part of Java’s collection since Java 1.2. This class is found in java.util package. It provides the basic implementation of the… Read More
HashMap in java is a class that is a part of the java collection. It implements the Map interface of java. It stores the data… Read More