## Find k numbers with most occurrences in the given array

Given an array of n numbers and a positive integer k. The problem is to find k numbers with most occurrences, i.e., the top k… Read More »

Given an array of n numbers and a positive integer k. The problem is to find k numbers with most occurrences, i.e., the top k… Read More »

Given an array with distinct elements, the task is to find the pairs in the array such that a % b = k, where k… Read More »

Given two sorted arrays of size m and n of distinct elements. Given a value x. The problem is to count all pairs from both… Read More »

Given an array of n integers. Count total number of sub-array having total distinct elements same as that of total distinct elements of original array.… Read More »

Given two Linked Lists, create union and intersection lists that contain union and intersection of the elements present in the given lists. Order of elements… Read More »

Given a n x n matrix. The problem is to find all the distinct elements common to all rows of the matrix. The elements can… Read More »

Given an array of n integers. The task is to find the difference of first and last index of each distinct element so as to… Read More »

Given a set of n numbers. The task is to count all the subsets of the given set which only have even numbers and all… Read More »

Given an array of n integers. The task is to find the first element that occurs k number of times. If no element occurs k… Read More »

Given an array with positive number the task is that we find largest subset from array that contain elements which are Fibonacci numbers. Asked in… Read More »

Given an integer array, print k-th distinct element in an array. The given array may contain duplicates and the output should print k-th element among… Read More »

Given an array of n integers. The task is to print the duplicates in the given array. If there are no duplicates then print -1.… Read More »

Find whether an array is subset of another array Union and Intersection of two Linked Lists Find a pair with given sum Find Itinerary from… Read More »

In this article, we will see how hashmap’s get and put method works internally. What operations are performed. How the hashing is done. How the… Read More »

Given an array of integers arr[] and a number m, count the number of subarrays having XOR of their elements as m. Examples: Input :… Read More »