##
Recaman’s sequence
April 3, 2017

Given an integer n. Print first n elements of Recaman’s sequence. Examples: Input : n = 6 Output : 0, 1, 3, 6, 2, 7… Read More »

April 3, 2017

Given an integer n. Print first n elements of Recaman’s sequence. Examples: Input : n = 6 Output : 0, 1, 3, 6, 2, 7… Read More »

March 31, 2017

Given an integer array with repeated elements, the task is to find sum of all distinct elements in array. Examples: Input : arr[] = {12,… Read More »

March 29, 2017

Given an array of distinct integers, the task is to find two pairs (a, b) and (c, d) such that ab = cd, where a,… Read More »

March 18, 2017

Given a list of words with lower cases. Implement a function to find all Words that have the same unique character set . Example: Input:… Read More »

March 17, 2017

Given two unsorted arrays of distinct elements, the task is to find all pairs from both arrays whose sum is equal to x. Examples: Input… Read More »

March 13, 2017

Given two given arrays of equal length, the task is to find if given arrays are equal or not. Two arrays are said to be… Read More »

February 26, 2017

Given an array of distinct elements. The task is to find triplets in array whose sum is zero. Examples: Input : arr[] = {0, -1,… Read More »

February 20, 2017

Given an array of n non-negative integers. The task is to find frequency of a particular element in the arbitrary range of array[]. The range… Read More »

February 13, 2017

Given an array of n positive integers with many repeating elements. The task is to find maximum difference between the frequency of any two different… Read More »

February 11, 2017

Given two sets of integers as two arrays of size m and n. Find count of minimum numbers that should be removed from the sets… Read More »

February 10, 2017

Given an array of n elements. The task is to count the total number of indices (i, j) such that arr[i] = arr[j] and i… Read More »

February 5, 2017

Given a binary tree, print it vertically. The following example illustrates vertical order traversal. 1 / \ 2 3 / \ / \ 4 5… Read More »

February 2, 2017

Given an array of integers, print the number of pairs in the array that form an amicable pair. Two numbers are amicable if the first… Read More »

February 1, 2017

Given three integer arrays and a “sum”, the task is to check if there are three elements a, b, c such that a + b… Read More »

January 29, 2017

Given two arrays, the task is that we find numbers which are present in first array, but not present in the second array. Input :… Read More »