## Minimum Swaps required to group all 1’s together

Given an array of 0’s and 1’s, we need to write a program to find the minimum number of swaps required to group all 1’s… Read More »

Given an array of 0’s and 1’s, we need to write a program to find the minimum number of swaps required to group all 1’s… 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 n arrays of size m eacg. Find maximum sum obtained by selecting a number from each array such that the elements selected from i-th… Read More »

You are given an array A[] of n-elements and a positive integer k. Now you have find the number of pairs Ai, Aj such that… Read More »

We are given n-processes with their completion times in form of an array. We need to find the time instant when a given process p… Read More »

Given two sorted arrays, A and B, where A has a large enough buffer at the end to hold B. Merge B into A in… Read More »

Given a sorted array of strings which is interspersed with empty strings, write a method to find the location of a given string. Examples: Input… Read More »

Given N numbers with no duplicates, count the number of unique triplets (ai, aj, ak) such that their XOR is 0. A triplet is said… Read More »

We have an array of the form {a0, a1, a2….., an, b0, b1, b2, …..bn} and our task is to rearrange the same in theform… Read More »

Given an array of N integers. We need to find an index such that Frequency of Even numbers on its left side is equal to… Read More »

In this article, we will discuss some important concepts related to arrays and problems based on that. Before understanding this, you should have basic idea… Read More »

You are given an array of n-elements with a basic condition that occurrence of greatest element is more than once. You have to find the… Read More »

Given an array of positive integers. Sort the given array in decreasing order of number of factors of each element, i.e., element having the highest… Read More »

Given an array and an integer k, traverse the array and if the element in array is k, double the value of k and continue… Read More »

Given an array of size n of integers in range from 1 to n, we need to find the inverse permutation of that array. An… Read More »