Given an array arr[] of size N, the task is to find the total count of operations required to remove all the array elements such… Read More

# Category Archives: Arrays

Given an array arr[] of size N, the task is to check if the array is spirally sorted or not. If found to be true,… Read More

Given a set S of size N (1 ≤ N ≤ 1e5) consisting of intervals, the task is to find the minimum intervals required to… Read More

Given an array arr[] consisting of N distinct integers, the task is to find the minimum number of times the array needs to be split… Read More

Given an array A[] of size N, the task is to count the numbers of ways to construct an array B[] of size N, such… Read More

Given an array arr[] consisting of a permutation of first N natural numbers, the task is to find the maximum possible value of ΣGCD(arr[i], i)… Read More

Given an array of equal-length strings arr[], the task is to make all the strings of the array equal by replacing any character of a… Read More

Given an array arr[] consisting of N positive integers and an integer K, the task is to find the minimum number of array elements required… Read More

Given an array arr[] of size N, the task is to count the pairs whose concatenation of elements is divisible by 3 and each array… Read More

Given an array arr[] of size N and a positive integer K, the task is to find the minimum possible cost to split the array… Read More

Given an array arr[] consisiting of first N natural numbers (N is even), the task is to find a sequence of swaps that can sort… Read More

Given an array arr[] of size N, the task is to find the smallest possible remaining array element by repeatedly removing a pair, say (arr[i],… Read More

Given two arrays A[] and B[] of N unique elements, the task is to find the maximum number of matched elements from the two given… Read More