# Tag Archives: array-rearrange

Given two binary arrays arr1[] and arr2[] of the same size, the task is to make both the arrays equal by swapping pairs of arr1[… Read More
Given an array arr[] of size N and a positive integer K, the task is to find the maximum prefix sum after K reversals of… Read More
Given an array arr[] consisting of N integers, the task is to print the last remaining array element after repeatedly selecting pairs of increasing adjacent… Read More
Given an array arr[] of size N, the task is to maximize the absolute difference between the sum of even indexed elements and the sum… Read More
Given an array arr[] consisting of N integers, the task is to minimize the number of operations required to make all array elements equal by… Read More
Given an array arr[] consisting of N integers, the task is to minimize the count of elements required to be multiplied by -1 such that… Read More
Given an array arr[], the task is to check if it is possible to make all array elements equal by repeatedly choosing a triplet (i,… Read More
Given a matrix mat[][] of dimension M * N, the task is to first compress it to obtain an array and, then compress it again… Read More
Given an array arr[] of size N, the task is to find the minimum count of adjacent swaps required to rearrange the array elements such… Read More
Given an array arr[] consisting of N positive integers, the task is to rotate the digits of array elements in an anti-clockwise direction such that… Read More
Given an array arr[] of size N, the task is to make all the array elements equal by performing following operations minimum number of times:… Read More
Given an integer K and a square matrix mat[][] of size N * N with elements from the range[1, K], the task is to count… Read More
Given two binary arrays L1[] and L2[], each of size N, the task is to minimize the count of remaining array elements after performing the… Read More
Given an array arr[] of size N, the task is to find the minimum increments by 1 required to be performed on the array elements… Read More
Given a positive integer N, the task is to construct an array of length N and find the maximize the value at index K such… Read More