# Tag Archives: math (adsbygoogle = window.adsbygoogle || []).push({});

## Minimum steps needed to cover a sequence of points on an infinite grid

Given an infinite grid, initial cell position (x, y) and a sequence of other cell position which needs to be covered in the given order.… Read More »

## Check if the large number formed is divisible by 41 or not

Given the first two digits of a large number digit1 and digit2. Also given a number c and the length of the actual large number.… Read More »

## Deriving the expression of Fibonacci Numbers in terms of golden ratio

Prerequisites: Generating Functions, Fibonacci Numbers, Methods to find Fibonacci numbers. The method of using Generating Functions to solve the famous and useful Fibonacci Numbers‘ recurrence… Read More »

## Place N^2 numbers in matrix such that every row has an equal sum

Given a number N, place numbers from the range [1, N2] in an NxN matrix such that sum in every row is equal. Examples: Input:… Read More »

## Program to print tetrahedral numbers upto Nth term

Prerequisites: Triangular numbers Tetrahedral numbers Given a value n, and the task is to print tetrahedral number series up to nth term. Examples: Input: 5… Read More »

## Program to find the Volume of a Triangular Prism

Given the length, width, and height of a triangular prism, the task is to find the volume of the triangular prism. Examples: Input: l =… Read More »

## Element which occurs consecutively in a given subarray more than or equal to K times

Given an array of size N and Q queries, each query consists of L, R, and K(consider 1 based-indexing for L and R). The task… Read More »

## Recursive program to print formula for GCD of n integers

Given a function gcd(a, b) to find GCD (Greatest Common Divisor) of two number. It is also known that GCD of three elements can be… Read More »

## Program to find the Area and Volume of Icosahedron

Given the side of an Icosahedron. The task is to find the area and volume of the given Icosahedron. Examples : Input : a =… Read More »

## Number of odd and even results for every value of x in range [min, max] after performing N steps

Given a number N and the min and max range. Given N values of a and b respectively. The task is to count the number… Read More »

## Program to check congruency of two triangles

Given four arrays of 3 numbers each which represents sides and angles of two triangles. The task is to check if the two triangles are… Read More »

## Program to print the berth of given railway seat number

Given a railway seat number, the task is to check whether it is a valid seat number or not. Also print its berth type i.e… Read More »

## Square of large number represented as String

Given a very large number, the task is to write a program to compute its square. Examples: Input: 9999 Output: 99980001 9999*9999 = 99980001 Input:… Read More »

## Program to calculate area of an Circle inscribed in a Square

Given the side of a square. The task is to find the area of an inscribed circle in a square. Examples: Input : a =… Read More »

## Find (a^b)%m where ‘b’ is very large

Given three numbers a, b and m where 1<=a, m<=10^6. Given very large 'b' containing up to 10^6 digits and m is a prime number,… Read More »