Skip to content

Category Archives: Arrays

Given two arrays arr1[] and arr2[] of size N and M (M < N) add all elements of arr2[] in all possible subarrays of arr1[]… Read More
Given an arr[] of length N, the task is to find the smallest possible sum of the array when we can subtract 1 and 2… Read More
Given 2 arrays arr1[] and arr2[], of size N and M respectively, the task is to find a pair of value (say a and b)… Read More
Given an array a[] of 2*N integers, The task is to make the array a[] of size N i.e, reducing it to half size such… Read More
Given two arrays X[] and Y[] of length N each. You can shift from X[] to Y[] at most once. The task is to output… Read More
Given an array of positive elements arr[] of length N, the task is to count all the subarrays such that the product of the subarray… Read More
Given an array arr[] of size N of positive integers. The task is to rearrange the array after applying the conditions given below:  If arr[i]… Read More
Given an array arr[] of length N, the task is to find the number of subarrays where the least common multiple (LCM) of the subarray… Read More
Given two integer arrays A[] and B[] of length N and M respectively, the task is to find the minimum number of operations required such… Read More
What is an array? An array is a collection of items of the same data type stored at contiguous memory locations. This makes it easier… Read More
Given a positive array arr[] of size N (2 ≤ N ≤ 105) and a positive integer K, the task is to minimize the maximum… Read More
Given an arr[] of length N. Then the task is to find minimum steps to make all the elements of the given equal. 2 types… Read More
What is Array Tag? Array tag allows you to store values with single memory and read elements as an array. Array Tag only points out… Read More
Given an array arr[] consisting of N non-negative integers. The task is to find a rearrangement of the array such that the prefix OR for… Read More
Given an array arr[] of size N. The task is to find an array of size N such that the ith element is the summation… Read More

Start Your Coding Journey Now!