# Category Archives: Mathematical

Given three integers N, X and Y, the task is to check if N can be obtained from 0 using the following operations:  The current… Read More
Given an array arr[] of size N. The task is to reorder arr[] and find the maximum number of GCD pairs which follows the conditions… Read More
Given a number N, the task is to find the minimum number of digits that needs to be removed from the number so that the… Read More
Given an array arr[]. The task is to find the position of the leader element in arr[]. The leader element is the one, which can… Read More
Given three numbers N, D and K, the task is to find the minimum absolute value of N after applying K operations. In one operation,… Read More
Given a ternary string S consisting of only three characters, the task is to find the count of ordered triplets (i, j, k) such that… Read More
In a party of N people, only one person is known to everyone. Such a person may be present at the party, if yes, (s)he… Read More
Given a number N, the task is to check whether the digits of the number are increasing and decreasing alternatively. If the number of digits… Read More
Given a 32-bit integer N. The task is to reverse N, if the reversed integer overflows, print -1 as the output. Examples Input: N =… Read More
Given a string str of size N, containing ‘ ‘, ‘.’, ‘-‘, ‘+’, and [‘0’-‘9’], the task is to find the valid integer from this… Read More
Given an integer N and an integer D, the task is to reach N from 1 in minimum moves by either adding 1 or doubling… Read More
Given a number N, the task is to find the sum of the below series till N terms. 1+(1+2)/2+(1+2+3)/3+… till N terms Examples: Input: N… Read More
Given an array A[] of length N, where N is an even number, the task is to answer Q independent queries where each query consists… Read More
Given an array A[] of length N, where N is an even number, the task is to answer Q independent queries where each query consists… Read More
Given an array A[] of length N, where N is an even number, the task is to answer Q independent queries where each query consists… Read More