##
Find all pairs (a, b) in an array such that a % b = k
June 25, 2017

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 »

June 25, 2017

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 »

June 23, 2017

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 »

June 21, 2017

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 »

June 15, 2017

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 »

June 5, 2017

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 »

May 24, 2017

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 »

May 23, 2017

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 »

May 21, 2017

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 »

May 19, 2017

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 »

May 17, 2017

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 »

May 2, 2017

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 »

May 1, 2017

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 »

April 20, 2017

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 »

April 13, 2017

Given a string, find the first repeated character in it. We need to find the character that occurs more than once and whose index of… Read More »