# Category Archives: Arrays

Given an array A[] of size N. In each step reduce an element to 0 and decrement all the non-zero elements by 1 till all… Read More
Given an arr[] of positive integers and start[] and end[] arrays of length L, Which contains the start and end indexes of L number of… Read More
Given a binary array A[] of size N, the task is to check whether the array can be converted into a palindrome by flipping two… Read More
Given a binary string S and an array arr[] each of size N, we can pick any element from the Array which is to the… Read More
Given two binary arrays A[] and B[] of size N, the task is to construct the lexicographically smallest binary array X[]  such that the number… Read More
Given an array A[ ] of size N, the task is to check if the sum of every even-sized subarray is 0 or not. Examples:… Read More
Given an array A[] of size N and an integer K. Each element of the array is either 0, 1 or 2. The task is… Read More
Given an array nums[] of size N and a starting index K. In one move from index i we can move to any other index… Read More
Given two arrays A[] and B[] of length N, the task is to check if both arrays can be made equal by performing the following… Read More
Given an array arr[] of size N and a non-negative integer K, the task is to find the length of the longest subsequence such that… Read More
Given an array arr[] of N distinct non-negative integers, the task is to determine if there is an even number that can be represented as… Read More
There is only one room which is holding N meetings that are given as intervals of the form (start[i], end[i], people[i]) where start[i] is the… Read More
Given an array arr[] containing N integers, the task is to find the XOR of all the elements of this array that are perfect squares.… Read More
Given an array arr[] consisting of N elements(such that N = 2k for some k ≥ 0), the task is to reduce the array and… Read More
Given N elements that have two costs associated with them that are represented in two arrays Costs1[] and Costs2[] of length N each and an… Read More