# Category Archives: Arrays

Given an array arr[] of size N, the task is to find the maximum number of subsets the array can be split such that the… Read More
Given an integer array arr[] of size N, the task is to generate a new array by replacing ith element with its immediate right smaller… Read More
Given an array arr[] of N integers, the task is to find the element which is left at last after performing the following operation N… Read More
Given an array arr[] and two integers N and X, the task is to find if it is possible to create an array using N… Read More
Given a list of words followed by two words, the task is to find the minimum distance between the given two words in the list… Read More
Given an array A[] consisting of N integers and an integer K. The task is to find the total number of ways in which you… Read More
Given a binary array A[] of length 2*N, the task is to find the minimum number of partitions that follow the below conditions: Each array… Read More
Given an array arr[] consisting of N distinct integers and an array Q[][2] consisting of M queries of the form [L, R], the task for… Read More
Given an array ranges[] of size N (1 ≤ N ≤ 105), where ranges[i] = {starti, endi} represents the range between starti to endi (both… Read More
In this article, we are going to learn how to check if a value is present in an array or not. To do so we… Read More
Given an array arr[] of 1s and -1s, the task is to partition the array into maximum subarrays such that the sum of the alternating… Read More
Given a binary array A[] and an integer X, the task is to check whether it is possible to divide A[] into exactly X non-empty… Read More
Given two arrays X[] and Y[] of length N each. You can make a pair by selecting exactly one element from X[] and Y[]. The… Read More
Given an array nums [] of size N containing positive integers and a positive integer K, the task is to find the minimum number of… Read More
Given two arrays A[] and B[] having lengths N and M respectively, Where A[] and B[] can contain both positive and negative elements, the task… Read More