# Category Archives: Arrays

Given an array arr[] of size N, the task is to count the number of pairs from the given array such that the Bitwise AND… Read More
Given an array arr[] of size N, consisting of N / 2 even and odd integers each, and an integer K, the task is to… Read More
Given a string S consisting of lowercase alphabets, the task is to check whether the given string can be rearranged such that the string can… Read More
Given an array arr[] consisting of N integers, the task is for each array element, say arr[i], is to find the number of array elements… Read More
Given a binary matrix mat[][] of dimensions of N * M and pairs of integers src and dest representing source and destination cells respectively, the… Read More
Given a sorted array arr[] consisting of N positive integers, the task is to minimize the total number of increments or decrements of each array… Read More
Given an array arr[][] consisting of N segments of the form {L, R, V} where, [L, R] denotes a segment with velocity V in any… Read More
Given a string S and an array of strings arr[] of length N and M respectively, the task is to find the string from the… Read More
Given an array arr[] consisting of N positive integers and two positive integers A and B, the task is to replace each array element with… Read More
Given an array arr[] consisting of N positive integers, the task is to count the number of subarrays whose Bitwise OR of its elements even.… Read More
Given an array arr[] consisting of N(> 2) integers, the task is to find the peak index of the array. If the array doesn’t contain… Read More
Given an array of strings arr[] consisting of lowercase and uppercase characters only, the task is to modify the array by removing the characters from… Read More
Given two arrays A[] and B[], both consisting of N positive integers, an integer P and the elements of the array A[] are pairwise co-prime, the… Read More
Given an array arr[][] of size N, consisting of pairs of coordinates such that arr[i] and arr[i] represents the X and Y coordinates in a… Read More
Given an array arr[] of size N, the task is to find the average of the array elements without running into overflow. Examples: Input: arr[]… Read More