Given an array arr[] consisting of N strings, the task is to sort the array in ascending order after modifying each string by removing all… Read More

# Tag Archives: array-rearrange

Given an array arr[] consisting of N integers, the task is to find the last remaining array element after removing every second element, starting from… Read More

Given an sorted array arr[] consisting of N elements, the task is to find the minimum of all maximum differences between adjacent elements of all… Read More

Given an array arr[] of size N, the task is to check if it is possible to sort the array using the following operations: Swap(arr[i],… Read More

Given a binary array arr[] of size N, the task is to find the total cost required to make all array elements equal to 1,… Read More

Given an array arr[] consisting of N integers, the task is to modify the array by replacing each array element with the number obtained by… Read More

Given two arrays A[] and B[], both consisting of a permutation of first N natural numbers, the task is to count the minimum number of… Read More

Given an array arr[] consisting of N positive integers and a positive integer K, the task is to minimize the maximum element present in the… Read More

Given a circular array arr[] consisting of N positive integers, the task is to modify the array by replacing each array element with the nearest… Read More

Given an array arr[] consisting of N integers, the task is to count the number of pairs whose Bitwise XOR is odd, that can be… Read More

Given an array arr[] consisting of N positive integers and a positive integer X, the task is to check if the sum of the given… Read More

Given an array arr[] consisting of N integers, the task is to find the minimum number of adjacent swaps required to make the first and… Read More

Given an array arr[] consisting of N positive integers, the task is to make all array elements equal by repeatedly subtracting 1 from any number… Read More

Given two matrices A[][] and B[][] of size M × N and an integer X, the task is to check if it is possible to… Read More