Skip to content

Category Archives: Arrays

Given an array A[] of size N, and an integer X, the following operation can be performed on that array: Choose any element, say Y… Read More
Given an array A[] of size N where each element A[i] =max(P[0], P[1], . . ., P[i]), where P[] is a permutation consisting of elements… Read More
Given an array A[] of the length N. The task is to find the minimum sum of the array (i.e. A1 + A2 + …… Read More
Given an array A of size N, the task is to find the minimum number of operations required to make array A empty. The following… Read More
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

Start Your Coding Journey Now!