Given an array A[] of N integers, the task is to find min(A[0], A[1], …, A[i-1]) – min(A[i+1], A[i+2], …, A[n-1]) for each i (1… Read More
Category Archives: Arrays
Given an array arr[] of positive integers, the task is to find the count of all the pairs (X, Y) in the array such that… Read More
Given two arrays arr1[] and arr2[], the task is to check if the product of elements of arr1 is divisible by the product of elements… Read More
Given an array A[] of size N. Let us denote S as the sum of all integers present in the array. Among all integers present… Read More
Given an array of size n, the task is to find the minimum number of operations required in the array such that the product of… Read More
Given an array arr[] and N, which is the size of this array, the task is to reverse this array without changing the position of… Read More
Given an array A[] of N integers and 2 integers X and Y. The task is to minimize the sum of all elements of the… Read More
Given an array arr[], the task is to print the minimum number of operations required to convert the array such that neither two even elements… Read More
Given an array, arr[], and an integer K, the task is to check whether K consecutive palindrome numbers are present or not. Examples: Input: arr[]… Read More
Given an integer array A of size N, and Q queries. In each query, you are given an integer X. Create a new sequence X^A[i], say… Read More
Given an array A[] consisting of n elements and integer K. The task is to find the maximum length of the subsequence of array A[],… Read More
Given an array a[] equal = {1} and a target array b[], the task is to check whether you can transform a to b or… Read More
C programming language does not provide any direct implementation of Map or Dictionary Data structure. However, it doesn’t mean we cannot implement one. In C,… Read More