## Find the first repeated character in a string

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 »

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 »

Most of the web applications require their users to authenticate themselves by asking them username and password. They compare the user supplied credentials with the… Read More »

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 »

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 »

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 »

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 »

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 »

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 »

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 »

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 »

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 »

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 »

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 »

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

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 »