Given three numbers N, K, and B, the task is to check if N contains only K as digits in Base B. Examples: Input: N… Read More

# Tag Archives: math

Given an array arr[] of length N, the task is to check if it can be formed by merging two permutations of the same or… Read More

Given three integers X, Y and P, the task is to find the minimum window size K such that every window in the range [X,… Read More

Given an array of integers arr of size N, the task is to find the minimum possible of the expression by choosing exactly K(≤ N)… Read More

Given an integer N and set of digits D[], which consists of digits from [1, 9]. The task is to count the numbers possible less… Read More

Given two numbers and N and D. Apply any of two below operations to N: add D to N change N to digitsum(N), where digitsum(N)… Read More

Given a number N, the task is to find the number of interesting primes less than equal to N.An interesting prime is any prime number… Read More

Given a positive integer N, the task is to count all possible distinct binary strings of length N such that there are no consecutive 1’s.… Read More

The tgamma() function is defined in header math.h header in C and cmath library in C++. This function is used to compute the gamma function… Read More

The fpclassify() function are defined in header math.h header in C and cmath library in C++. This function is used to get the value of… Read More

Given a string array item[] and an integer array price[] where price[i] is the price of the item[i] when purchased from the ith shop. The… Read More

Given three integers A, B and C. The task is to count the number of triples (a, b, c) such that a * c >… Read More

Given an array, the task is to count the elements of array whose factors are less than the given number x. Examples: Input: arr =… Read More

Given three integers A, B and K. Initially, the first person was ahead of the second person by K kms. In every hour, the first… Read More

Determinant of a Matrix is a scalar property of that Matrix. Determinant is a special number that is defined for only square matrices (plural for… Read More