Skip to content

Category Archives: Mathematical

Given an array arr[] consisting of N positive integers, the task is to sort the array arr[] according to the increasing order of GCD of… Read More
 Given an array, arr[] consisting of N integers, the task for each array element arr[i] is to print the sum of |i – j| for… Read More
Given an array arr[] consisting of N positive integers, the task is to find an array element X such that sum of its absolute differences… Read More
Given an array arr[] consisting of N integers and two positive integers L and R, the task is to find the farthest co-prime number in… Read More
Given an array arr[] consisting of N positive integers, the task is to find the minimum number of bits of array elements required to be… Read More
Given an array arr[] consisting of N integers and an integer K, the task is to find the sum of the array elements possible by… Read More
Given two arrays arr[] and S[] consisting of N and K integers, the task is to find the maximum sum of minimum and maximum of… Read More
Given an array arr[] consisting of N binary strings, and two integers A and B, the task is to find the length of the longest… Read More
Given an array arr[] consisting of N integers, the task is to check if the sum of all possible values of (arr[i] / j) for… Read More
Given an array arr[] consisting of N integers, the task is to split the array into subarrays such that the sum of the difference between… Read More
Given an array arr[] consisting of N integers, the task is to find the minimum number of array elements required to be incremented to make… Read More
Given three positives integers A, B, and C, the task is to count the minimum number of flipping of bits required in A and B,… Read More
Given an array arr[] consisting of N positive integers, the task is to find the number of array elements whose count of divisors is a… Read More
Golden Ratio: Two numbers, say A and B are said to be in the golden ratio if their ratio equals the ratio of the sum… Read More
Given two positive integers A, B, and an array D[] consisting only of digits [0-9], the task is to check if it is possible to… Read More