Skip to content

Category Archives: Mathematical

Given an integer n, denoting the number of cuts that can be made on a pancake, find the maximum number of pieces that can be… Read More
Write code to convert a given number into words. Examples: Input: 438237764 Output: forty three crore eighty two lakh thirty seven thousand seven hundred and… Read More
Given an integer n (can be very large), find the number of digits that appear in its factorial, where factorial is defined as, factorial(n) =… Read More
Given an integer n, find the number of digits that appear in its factorial, where factorial is defined as, factorial(n) = 1*2*3*4……..*n and factorial(0) =… Read More
Given three numbers a, b and c such that a, b and c can be at most 1016. The task is to compute (a*b)%c A… Read More
Given a number n, find the cube root of n. Examples: Input: n = 3 Output: Cubic Root is 1.442250 Input: n = 8 Output:… Read More
Given a number n, find two pairs that can represent the number as sum of two cubes. In other words, find two pairs (a, b)… Read More
Given a number n, find two pairs that can represent the number as sum of two cubes. In other words, find two pairs (a, b)… Read More
Given a positive integer n, find the no of factors in n! where n <= 105. Examples : Input : n = 3 Output :… Read More
Given two integers a and b, how can we evaluate the sum a + b without using operators such as +, -, ++, –, …?… Read More
Given a number n, find number of ways we can add 3 non-negative integers so that their sum is n. Examples : Input : n… Read More
Given an array of n numbers, find LCM of it.   Input : {1, 2, 8, 3} Output : 24 Input : {2, 7, 3, 9,… Read More
Given an array, find the number of subarrays whose sum is even. Example :  Input : arr[] = {1, 2, 2, 3, 4, 1} Output… Read More
A Diophantine equation is a polynomial equation, usually in two or more unknowns, such that only the integral solutions are required. An Integral solution is… Read More
Given two numbers ‘a’ and ‘b’. Find the minimum difference between any terms in shifted infinite tables of ‘a’ and ‘b’, given shifts ‘x’ and… Read More