Skip to content

Tag Archives: array-rearrange

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
Given an array arr[ ] consisting of N positive integers and a 2D array Q[][] consisting of queries of the form {i, val}, the task… Read More
Given an array arr[] of size N consisting of 0, 1, 2, and 3 only, the task is to sort the given array in ascending… Read More
Given an array arr[] consisting of N integers, the task is to find the maximum sum of any subarray possible after removing at most one… Read More
Given an array consisting of first N odd numbers, the task is to find the minimum number of operations required to make all the array… Read More
Given an integer K and an array A[] of size N, the task is to create a new array with sum K with minimum number… Read More