## 10’s Complement of a decimal number

Given a decimal number N. The task is to find 10’s complement of the number N. Example: Input : 25 Output : 10’s complement is… Read More »

## Number of N digit integers with weight W

Given N, the number of digits of an integer which is greater than or equal to 2 and a weight W. The task is to… Read More »

## Number of integral solutions for equation x = b*(sumofdigits(x)^a)+c

Given a, b and c which are part of the equation x = b * ( sumdigits(x) ^ a ) + c. Where sumdigits(x) determines… Read More »

## Length and Breadth of rectangle such that ratio of Area to diagonal^2 is maximum

Given an array of positive integers. The task is to choose a pair of elements from the given array such that they represent the length… Read More »

## Count number of right triangles possible with a given perimeter

Given a perimeter P, the task is to find the number of right triangles possible with perimeter equal to p. Examples: Input: P = 12… Read More »

## Sudo Placement[1.7] | Greatest Digital Root

Given a number N, you need to find a divisor of N such that the Digital Root of that divisor is the greatest among all… Read More »

## Program to find last two digits of 2^n

Given a number n, we need to find the last two digits of 2n. Examples: Input : n = 7 Output : 28 Input :… Read More »

## Largest number with maximum trailing nines which is less than N and greater than N-D

Given two numbers N and D. The task is to find out the largest number smaller than or equal to N which contains the maximum… Read More »

## Distance between two parallel Planes in 3-D

You are given two planes P1: a1 * x + b1 * y + c1 * z + d1 = 0 and P2: a2 *… Read More »

## Probability that the pieces of a broken stick form a n sided polygon

We have a stick of length L. The stick got broken at (n-1) randomly chosen points (lengths of parts can be non-integer or floating point… Read More »

## Sum of series till N-th term whose i-th term is i^k – (i-1)^k

Given value of N and K. The task is to find the sum of series till N-th term whose i-th term is given by Ti… Read More »

## Haversine formula to find distance between two points on a sphere

The Haversine formula calculates the shortest distance between two points on a sphere using their latitudes and longitudes measured along the surface. It is important… Read More »

## Program to find equation of a plane passing through 3 points

Given three points (x1, y1, z1), (x2, y2, z2), (x3, y3, z3). The task is to find the equation of the plane passing through these… Read More »

## Perpendicular distance between a point and a Line in 2 D

Given a point (x1, y1) and a line (ax + by + c = 0). The task is to find the perpendicular distance between the… Read More »

## Program to find the Interior and Exterior Angle of a Regular Polygon

Given the number of sides n of a regular polygon. The task is to find out the Interior angle and Exterior angle of the polygon.… Read More »