Skip to content

Tag Archives: array-rearrange

Given an array arr[] consisting of N positive integers and an integer K, the task is to check if it is possible to reduce the… Read More
Given an array p[] of size N representing a permutation of first N natural numbers, where N is an even number, the task is to… Read More
Given an array arr[] consisting of N positive integers and an integer K, the task is to make the sum of all K-length subarrays equal… Read More
Given two arrays A[] and B[] of sizes N, the task is to find the maximum sum of Bitwise AND of same-indexed elements in the… Read More
Given two arrays A[] and B[] consisting of N positive integers such that each array element A[i] is placed at the ith position on the… Read More
Given two equal-length arrays A[] and B[], consisting only of positive integers, the task is to reverse any subarray of the first array such that… Read More
Given an array arr[] consisting of N positive integers, the task is to check whether the given array arr[] can be made strictly increasing such… Read More
Given an array arr[] consisting of N positive integers, the task is to rearrange the array such that the reversed binary representation of all the… Read More
Given an array arr[] consisting of N positive integers and an integer K, the task is to minimize the maximum value of the array by… Read More
Given a binary array arr[] of size N, the task is to check if the array arr[] can be made sorted by removing any subsequence… Read More
Given an array A[] of size N, containing a permutation of first N natural numbers and an integer K, the task is to find the… Read More
Given two arrays A[] and B[] of size N each, the task is to find the minimum possible sum of absolute difference of same indexed… Read More
Given a matrix mat[][] of dimensions NxN consisting of integers, the task is to find the maximum product of elements of the matrix mat[][] possible… Read More
Given an array arr[] consisting of N distinct positive integers, the task is to find the minimum number of elements required to be swapped to… Read More