Category Archives: Arrays

Given two Binary trees and two integer keys K1, K2 where both K1, K2 can be present in the same tree or in different trees.… Read More
Given two binary arrays L1[] and L2[], each of size N, the task is to minimize the count of remaining array elements after performing the… Read More
Given an array arr[] of size N, the task is to find the minimum increments by 1 required to be performed on the array elements… Read More
Given a positive integer N, the task is to construct an array of length N and find the maximize the value at index K such… Read More
Given an array arr[] of size N, the task is to count the number of subarrays consisting of a single distinct element that can be… Read More
Given an array arr[], the task is to append the given array exactly K – 1 times to its end and print the total number… Read More
Given an array of integers, arr[] of size N, the task is to print all possible sum at each valid index, that can be obtained… Read More
Given an array A[] of size N (1 ≤ N ≤ 105), the task is to calculate the number of swaps required to sort the… Read More
Given two arrays A[] and B[] consisting of N integers and an integer K, the task is to find the maximum value of B[i] +… Read More
Given an array arr[] of size N and an integer K, the task is to print all possible ways to split the given array into… Read More
Given an array A[] consisting of N positive integers and an integer X, the task is to determine if it is possible to convert all… Read More
Given two arrays arr1[] and arr2[] consisting of N and M integers respectively, and two integers X and Y, the task is to check if… Read More
Given an integer N which denotes the number of slots, and an array arr[] consisting of K integers in the range [1, N] repreand. Each… Read More
Given an array arr[] of size N, the task is to split the array into two subsets such that the Bitwise XOR between the maximum… Read More