# Category Archives: Mathematical

## Print Number series without using any loopNovember 10, 2017

Problem – Givens Two number N and K, our task is to subtract a number K from N until number(N) is greater than zero, once… Read More »

## Multiple calculations in 4 processes using fork()

Write a program to create 4 processes: parent process and its child process which perform various tasks : Parent process count the frequency of a… Read More »

## Ways to color a skewed tree such that parent and child have different colors

Given a skewed tree (Every node has at most one child) with N nodes and K colors. You have to assign a color from 1… Read More »

## Representation of a number in powers of other

Given two numbers w and m, we need to determine whether it is possible to represent m in terms of powers of w. The powers… Read More »

## Program to find remainder when large number is divided by 11November 9, 2017

Given a number n, the task is to find the remainder when n is divided by 11. The input of number may be very large.… Read More »

## Calculate the Discriminant Value

In algebra, Discriminant helps us in deducing various properties of the roots of a polynomial or polynomial function without even computing them. Let’s look at… Read More »

## Number of digits to be removed to make a number divisible by 3November 8, 2017

Given a very large number num (1 <= num <= 10^1000), print the number of digits that needs to be removed to make the number… Read More »

## Program for dot product and cross product of two vectorsNovember 7, 2017

There are two vector A and B and we have to find the dot product and cross product of two vector array. Dot product is… Read More »

## Iterated Logarithm log*(n)

Iterated Logarithm or Log*(n) is the number of times the logarithm function must be iteratively applied before the result is less than or equal to… Read More »

## Sum of digits of a given number to a given power

Given a number, we need to find the sum of all the digits of a number which we get after raising the number to a… Read More »

## Number of n digit numbers that do not contain 9

Given a number n, find how many n digit number can be formed that does not contain 9 as it’s digit. Examples: Input : 1… Read More »

## Count ways to express even number ‘n’ as sum of even integersNovember 5, 2017

Given an positive even integer ‘n’. Count total number of ways to express ‘n’ as sum of even positive integers. Output the answer in modulo… Read More »

## Number of steps to convert to prime factors

Given an array arr[] of n positive integers. Represent every number as its factors (x * y = arr[i]) [Here x or y cannot be… Read More »

## Co-prime pair with given sum minimum differenceNovember 3, 2017

Co-prime or mutually prime pair are those pair of numbers whose GCD is 1. Given a number n represent the number as the sum of… Read More »

## Subsequences of size three in an array whose sum is divisible by m

Given an array A[] (1