# Category Archives: Arrays

Given an array arr[] of length n, the task is to find the minimum number of operations required to make a permutation of integers 1… Read More
Given an array X[] of size N, then the task is to output the number of sub-arrays satisfying the given condition: The Sum of (X[i]… Read More
Given an integer array arr[] of size N, the task is to count the number of pairs whose BITWISE AND and BITWISE XOR are equal.… Read More
Given a permutation arr[] of size n  and a positive integer x, the task is to sort the permutation in increasing order by performing the… Read More
Given a pile of n pairs of elements in array arr[], containing 2*n elements, we have to print with the following conditions follow: If pair… Read More
Given an array arr[] of length n, the task is to calculate the min index of the element which has maximum elements present in the… Read More
Given a sorted array arr[] of size N, the task is to find the length of the longest subarray and print the subarray such that… Read More
Given an integer array arr[] of size N. Let P is the product of all elements in the array. Return 1 if P is positive,… Read More
Given a positive integer X, the task is to find a permutation of length X such that all subarray sum of length greater than one… Read More
Given an array arr[] of integers of size n, the task is to check if we can sort the given array in non-decreasing order(i, e.arr[i]… Read More
Given an array of N integers. You can perform an operation that selects a contiguous subarray and replaces all its elements with the MEX (smallest… Read More
Geek is playing a video game that contains N monsters having varying power denoted by power[i]. Geek will play total Q rounds and for each… Read More
Given an array arr[] of size N. You need to find the total number of good pairs such that the if you chose two numbers… Read More
Given an array arr[] of size N, you are standing on origin (0, 0). You are allowed to move arr[0] units in the left direction,… Read More
Given an array arr[] of length N and a positive integer k, the task is to find the minimum length of the subarray that needs… Read More