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

# Tag Archives: array-rearrange

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

Given a matrix mat[][] of dimension N * M, the task is to count the minimum number of decrements of distinct array elements required such… Read More

Given a sorted array arr[] consisting of N positive integers, the task is to minimize the total number of increments or decrements of each array… Read More

Given an array of strings arr[] consisting of lowercase and uppercase characters only, the task is to modify the array by removing the characters from… Read More

Given two arrays arr[] and jump[], each of length N, where jump[i] denotes the number of indices by which the ith element in the array… Read More

Given a matrix mat[][] of dimensions N * M, the task is to sort each column of a matrix in ascending order and print the… Read More

Given a matrix mat[][] of dimensions M * N, the task is to print the matrix obtained after rotating every ith row of the matrix… Read More

Given an array arr[] of length, N, the task is to find the winner of a game played by two players A and B optimally,… Read More

Given an array arr[] consisting of N integers and an integer X, the task is to check if it is possible to modify the array… Read More

Given a binary array A[] of size N, where all 1s can be moved to its adjacent position, the task is to print an array… Read More