Given an array arr[] with N integers, find the number of triplets of i, j and k such that 1<= i < j < k… Read More
Category Archives: Mathematical
Given two natural numbers A and B (B >= A) and an integer N, your task is to generate an array of natural numbers in… Read More
Given an array arr[] of Natural numbers, the task is to remove one element from front and one element from end and find their product… Read More
Given a number N, an array arr[], and a target number K, the task is to find minimum number of moves to reach K by… Read More
There are different kinds of apple trees in the four directions (East, West, North, South), which may grow both red and green apples such that… Read More
Given an array arr[] consisting of N integers, the task is to repeatedly select triplets and remove the maximum and minimum elements from the triplets… Read More
Given a matrix mat[][] of dimensions N*M and a positive integer K, the task is to find the number of cells in a grid from… Read More
Given a string str representing a number having N digits, the task is to calculate the number of ways to make the given number divisible… Read More
Given a positive integer N, the task is to count the number of N-digit numbers which contain all single digit primes. Examples: Input: N =… Read More
Given a binary string S, the task is to find the maximum length of substrings required to be flipped repeatedly to make all the characters… Read More
Given two arrays A[] and B[] consisting of N positive integers, the task is to the Bitwise XOR of same indexed array elements after rearranging… Read More
Given two integers X and Y, the task is to find two numbers whose Bitwise OR is X and their sum is Y. If there… Read More
Given an array arr[] and a positive integer K, the task is to find the maximum count of disjoint pairs (arr[i], arr[j]) such that arr[j]… Read More
Given an array arr[] of N integers, the task is to find the minimum number of increments/decrements of array elements by 1 to make the… Read More