# Category Archives: Arrays

Given an array of positive numbers arr[] and integer K. You have to choose the maximum number possible from left to right such that eachâ€¦ Read More
Given a 2D array span[][] of length N which contains spans [L, R] (0 â‰¤ L â‰¤ R â‰¤ 109), the task is to mergeâ€¦ Read More
Samwell laid out N bowls in a straight line and put a few marbles randomly in each bowl, ith bowl has A[i] marbles. A bowlâ€¦ Read More
There are N jobs and the start and finish times of the jobs are given in arrays start[] and end[] respectively. Each job requires oneâ€¦ Read More
Given a sorted array A[] of length N. For each i(0 â‰¤ i â‰¤ n-1), you have to make all the elements of the arrayâ€¦ Read More
Given two integers N (N â‰¥ 1) and K (K â‰¥ 1), where N denotes the number of petrol pumps from 1 to N andâ€¦ Read More
Given 2 sorted arrays Ar1 and Ar2 of size N each. Merge the given arrays and find the sum of the two middle elements ofâ€¦ Read More
Given an integer array A[] of size N and integer k. For a fixed value p, choose an index i (1 â‰¤ i â‰¤ n)â€¦ Read More
An array is a collection of items of same data type stored at contiguous memory locations Array example Types of Arrays: One-dimensional Array: It isâ€¦ Read More
Given an unsorted permutation array of size N and an integer K ( 1 â‰¤ K â‰¤ N ), the task is to sort thisâ€¦ Read More
Given a boolean array a[] of size N and integer K. Initially, all are marked false. We have to choose 2 different indexes having theâ€¦ Read More
Given an array X[] of length N, the task is to find the minimum number of times the operation is used to sort X[], ifâ€¦ Read More
Given two integers N and X. Then the task is to return YES or NO by checking whether there exists a subarray in any permutationâ€¦ Read More
Given an undirected graph, a source node src, and an integer K, the task is to print all nodes after level K from the sourceâ€¦ Read More
Given an array arr[] of length, N, the task is to find how many powerful subarrays are present in the array.  Note: A powerful subarrayâ€¦ Read More