## Find the weight at (Xi, Yi) after M operations in a Matrix

Given n x n points on cartesian plane, the task is to find the weight at (xi, yj) after m operation. xi, yj, w denotes… Read More »

## How to determine length or size of an Array in Java?

There is no size() method available with the array. But there is a length field available in the array that can be used to find… Read More »

## How to add an element to an Array in Java?

Given an array of size n, the task is to add an element x in this array in Java. The size of the array cannot… Read More »

## Position of Elements which are equal to sum of all Preceding elements

Given an array Arr[] of N of positive integers. The task is to find positions of all the elements which are equal to the sum… Read More »

## Find the smallest positive number missing from an unsorted array | Set 3

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 »

## Sum of an array using MPI

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 »

## Minimum operations to make sum of neighbouring elements <= X

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 »

## Difference between pointer to an array and array of pointers

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 »

## Check whether we can sort two arrays by swapping A[i] and B[i]

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 »

## Find the maximum length of the prefix

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 »

## C program to sort an array using pointers

Given an array of size n, the task is to sort this array using pointers in C. Examples: Input: n = 5, arr[] = {0,… Read More »

## Check if each element of the given array is the product of exactly K prime numbers

Given an array of numbers and the value of , check if each number can be expressed as the product of exactly prime numbers. For… Read More »

## Implementing next_permutation() in Java with Examples

Given an array or string, the task is to find the next lexicographically greater permutation of it in Java. Examples: Input: string = “gfg” Output:… Read More »

## Count pairs in array whose sum is divisible by K

Given an array A[] and positive integer K, the task is to count total number of pairs in the array whose sum is divisible by… Read More »

## Longest sub-array whose product is 0

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 »