## Duplicates in an array in O(n) time and by using O(1) extra space | Set-3

Given an array of n elements which contains elements from 0 to n-1, with any of these numbers appearing any number of times. Find these… Read More »

Given an array of n elements which contains elements from 0 to n-1, with any of these numbers appearing any number of times. Find these… Read More »

Given an array arr containing elements from [1…to n]. Each element appears exactly once in the array arr. Given an string str of length n-1.… Read More »

You have given an array which contain 1 to n element, your task is to sort this array in an efficient way and without replace… Read More »

Given a constant array of n elements which contains elements from 0 to n-1, with any of these numbers appearing any number of times. Find… Read More »

We are given an array of 0s and 1s in random order. Segregate 0s on left side and 1s on right side of the array.… Read More »

We are given an array arr[] of size n. Numbers are from 1 to (n-1) in random order. The array has only one repetitive element.… Read More »

Given an integer n and an array of size n check if it satisfies following conditions:- All elements of array must lie between 1 to… Read More »

Given an array of size n. It is also given that range of numbers is from smallestNumber to smallestNumber + n where smallestNumber is the… Read More »

Given an array A[] consisting 0s, 1s and 2s, write a function that sorts A[]. The functions should put all 0s first, then all 1s… Read More »

Sorting using trivial hash function. Examples: Input : 9 4 3 5 8 Output : 3 4 5 8 9 We have read about various… Read More »

Given an array of unique integers where each integer of the given array lies in the range [1, N]. The size of array is (N-4).… Read More »

Given an array where elements are first continuously increasing and after that its continuously decreasing unit first number is reached again. We want to add… Read More »

Given an array of size n, the goal is to find out the smallest number that is repeated exactly ‘k’ times where k > 0?… Read More »

Given a sorted array of size n and given that there are numbers from 1 to n+1 with one missing, the missing number is to… Read More »

Given an array of n unique integers where each element in the array is in range [1, n]. The array has all distinct elements and… Read More »