Skip to content

Category Archives: Arrays

Given an array of jumps[] of length N, where each element denotes the maximum length of a jump forward from each index. The task is… Read More
Given an array arr[] of length N, The task is to find the maximum and the minimum number in the array. Examples: Input: arr[] =… Read More
Given N pairs of integers, each integer is between 1 to M, the task is to check if there exist two integers x and y… Read More
Given two arrays arr1[] and arr2[] of length N each and an integer K, The task is to maximize the number of equal elements at… Read More
Given two integers N and K and a range [L, R], the task is to build an array whose elements are unique and in the… Read More
An array is a linear data structure. In an array, the operation to fetch a value takes constant time i.e., O(1).  Let us see why… Read More
Given an array of N strings, the task is to find if it is possible to make all the strings equal by performing the following… Read More
Multidimensional arrays are arrays that have more than one dimension. For example, a simple array is a 1-D array, a matrix is a 2-D array,… Read More
A sparse array or sparse matrix is an array in which most of the elements are zero. Characteristics of Sparse array: The sparse array is… Read More
Array: An array is a collection of similar data types which is stored in contiguous memory locations. Arrays are static data structures with limited size.… Read More
Given two arrays arr1[] and arr2[] of sizes N and M and an integer K, the task is to find the maximum possible sum pair… Read More
Given two snapshots S1 and S2 of N elements, the task is to find the elements which are changing their groups and the ones that… Read More
Given two arrays arr1[] and arr2[] of size N each, the task is to find the minimum number of interchange of the same indexed elements… Read More
Given an integer N, the task is to construct an array of N distinct elements (arr[i] ≤ N+1) such that the bitwise XOR of every… Read More
Given a two-dimensional integer array arr[ ][ ], return all the adjacent elements of a particular integer whose position is given as (x, y). Adjacent… Read More

Start Your Coding Journey Now!