Skip to content

Category Archives: Mathematical

Given an string of binary number n. Convert binary fractional n into it’s decimal equivalent. Examples: Input: n = 110.101 Output: 6.625 Input: n =… Read More
Given an array of integers, we need to get total XOR of all subarray XORs where subarray XOR can be obtained by XORing all elements… Read More
Round 1: Aptitude test An aptitude test was conducted, comprising of 20 MCQs and 2 coding questions. MCQs were very easy. MCQs were based on… Read More
Given a large positive number as string, count all rotations of the given number which are divisible by 4.  Examples:  Input: 8 Output: 1 Input:… Read More
Given a number, the task is to check if a number is divisible by 6 or not. The input number may be large and it… Read More
The GCD of three or more numbers equals the product of the prime factors common to all the numbers, but it can also be calculated… Read More
The GCD of three or more numbers equals the product of the prime factors common to all the numbers, but it can also be calculated… Read More
Given an array of numbers, find GCD of the array elements. In a previous post we find GCD of two number.Examples:  Input : arr[] =… Read More
Given a number, the task is to check if a number is divisible by 8 or not. The input number may be large and it… Read More
Given a n-digit number. Prime point is the index of the digit whose left and right side numbers are prime. Print all the prime points… Read More
We are given a string S, we need to find count of all contiguous substrings starting and ending with same character. Examples : Input :… Read More
Given an integer n. Find politeness of number n. The politeness of a number is defined as the number of ways it can be expressed… Read More
Given two numbers x and n, find a number of ways x can be expressed as sum of n-th power of unique natural numbers. Examples… Read More
Given an integer n. Check whether the number n is superperfect number or not. A superperfect number is a positive integer which satisfies σ2(n) =… Read More
Given a number, the task is to check if a number is divisible by 4 or not. The input number may be large and it… Read More