# Category Archives: Arrays

Given a strictly increasing array A[] of size N, an integer K and Q queries of type [L, R], the task is to count the… Read More
Given an array A[] of size N, the task is to check if all the elements of the array, except 1st element can be made… Read More
Given an array of pairs arr[] of size N (N ≥ 3) where each element of pair is at most N and each pair is… Read More
What is Data Type? A data type defines the type of value that can be stored in a variable. Whenever a variable is defined, the… Read More
Given an array A[] of length N, choose any two elements x and y from the array, the task is to find the maximum value… Read More
You are given an array arr[] of size N, the task is to determine the MEX of the array. MEX is the smallest whole number… Read More
Given a permutation A[] of first N integers (i.e. array contains integers from 1 to N exactly once) and an integer K, the task is… Read More
Given an array Arr[] of size N, the cost of removing ith element is Arr[i]. The task is to remove the maximum number of elements… Read More
Given an array arr[] of N integers, the task is to check whether it is possible to make all the array elements identical by applying… Read More
Given an array A, the task is to find elements with the occurrence at least K times the frequency of the least occurring element in… Read More
Given two arrays x[] and y[] of N integers, the task is to form an array z[] of x[i] + y[j], (0 ≤i, j <… Read More
Arrays: The array is a collection of the same type of elements at contiguous memory locations under the same name.  It is easier to access… Read More
Given an integer array A[] of length N (N >= 1), the task is to print the total number of indices in the array that… Read More
Given two integers L and R, construct an array of given size N such that the GCD (Greatest Common Divisor) of the element with their… Read More
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