# Tag Archives: Arrays

Given an unsorted array with both positive and negative elements. The task is to find the smallest positive number missing from the array. Examples:  Input:… Read More
Prerequisite: MPI – Distributed Computing made easy Message Passing Interface(MPI) is a library of routines that can be used to create parallel programs in C… Read More
Given an array arr[] of N elements and an integer X, the task is to find the minimum number of operations required to make sum… Read More
Pointer to an array: Pointer to an array is also known as array pointer. We are using the pointer to access the components of the… Read More
Given two arrays, we have to check whether we can sort two arrays in strictly ascending order by swapping A[i] and B[i]. Examples:  Input :… Read More
Given an array arr[] of N integers where all elements of the array are from the range [0, 9] i.e. a single digit, the task… Read More
Given an array of numbers and the value of , check if each number can be expressed as the product of exactly prime numbers. For every element of the… Read More
Given an array or string, the task is to find the next lexicographically greater permutation of it in Java.Examples:   Input: string = "gfg" Output: ggf… Read More
Given an array A[] and positive integer K, the task is to count the total number of pairs in the array whose sum is divisible… Read More
Given an array arr[] of integer elements, the task is to find the length of the longest sub-array whose product is 0.Examples:   Input: arr[] =… Read More
Given a Complete Binary Tree as an array, the task is to print all of its levels in sorted order.Examples:   Input: arr[] = {7, 6,… Read More
Given an integer k and an array arr[] representing the destination floors for N people waiting currently at the ground floor and k is the… Read More
Given an array, the task is to copy these array elements into another array in reverse array.Examples:  Input: array: 1 2 3 4 5 Output:… Read More
Given an array arr[] of N integers and an index range [a, b]. The task is to sort the array in this given index range… Read More
Given an array of objects and the task is to return the unique object by the attribute.  Examples: Input: [ { name: 'Geeks', id: 10… Read More