Skip to content

Category Archives: Arrays

Given an array arr[] of size N, the task is to find the minimum moves to segregate even and odd numbers by swapping two adjacent… Read More
Given an array arr[] of N elements ranging from 0 to N-1(both included), the task is to rearrange the array such that the sum of… Read More
Given an array arr[] of length N, the task is to find the maximum number of subsets that can be obtained from the given array… Read More
Given an array A[] of size N, the task is to maximize the frequency of any element by adding any positive integer X to all… Read More
Given an array of size N and two integers M and K., All the integers in the array are in the range [1, M]. Find… Read More
Given an array A[] of N integers, the task is to find the lexicographically smallest subsequence of the array by deleting all the occurrences of… Read More
Given an array arr[] of size N, the task is to find the minimum number of operations required to reduce all three elements of the… Read More
Given an array arr[] of length N and an integer M, the task is to determine if a strictly increasing sequence can be formed by… Read More
Given an array A[] of size N, find the permutation of array A such that the array B[] which is formed by taking the GCD… Read More
Given Q queries in the form of a 2D array arr[][] in which every row consists of two numbers L and R which denotes a… Read More
Given an array A[] of N  integers, the task is to calculate the total number of pairs of indices (i, j) satisfying the following conditions… Read More
Given an array of non-negative integers arr[] and an integer K, the task is to minimize the product of array elements by performing at K… Read More
Given an array arr[] of N integers such that no element is 0 in that array, the task is to find the minimum number of… Read More
Given an array A[] of N integers, the task is to find the number of pairs of indices (1 ≤ i, j ≤ N) in… Read More
Given two arrays A[] and B[] of the same length N. the task is to find a pair (X, Y) for two numbers Ai (number… Read More

Start Your Coding Journey Now!