## Find the position of the last removed element from the array

Given an array of size and an integer . Perform the following operations on the given array: If a[i] > M then push a[i] –… Read More »

## Find two numbers whose sum and GCD are given

Given sum and gcd of two numbers and . The task is to find both the numbers a and b. If the numbers do not… Read More »

## Steps to reduce N to zero by subtracting its most significant digit at every step

Given a number . Reduce this number to zero by subtracting the number by it’s most significant digit(Left most digit) at every step. The task… Read More »

## Smallest number greater than or equal to N divisible by K

Given a number N and a number K, the task is to find the smallest number greater than or equal to N which is divisible… Read More »

## Minimize the value of N by applying the given operations

Given an integer N, below operations can be performed any number of times on N: Multiply N by any positive integer X i.e. N =… Read More »

## Count number less than N which are product of perfect squares

Given an Integer N. The task is count numbers P less than N such that P is a product of two distinct perfect squares. Examples:… Read More »

## Count ordered pairs with product less than N

Given an integer N. The task is to count the number of ordered pairs (a, b) such that . Examples: Input: N = 5 Output:… Read More »

## Greatest Integer Function

Greatest Integer Function [X] indicates an integral part of the real number which is nearest and smaller integer to . It is also known as… Read More »

## Primality test for the sum of digits at odd places of a number

Given an integer ‘n’, the task is to check whether the sum of digits at the odd positions (from right to left) is prime or… Read More »

## ElGamal Encryption Algorithm

ElGamal encryption is an public-key cryptosystem. It uses asymmetric key encryption for communicating between two parties and encrypting the message. This cryptosystem is based on… Read More »

## Check if a number is an Achilles number or not

Given a positive integer N. The task is to check if N is an Achilles number or not. Print ‘YES’ if N is an Achilles… Read More »

## Program to find count of numbers having odd number of divisors in given range

Given two integers A and B. The task is to count how many numbers in the interval [ A, B ] have an odd number… Read More »

## Check if a number is an Unusual Number or not

Given a positive integer N. The task is to check if N is an unusual number or not. Print ‘YES’ if M is an unusual… Read More »

## Check if difference of areas of two squares is prime

Given two squares with side lengths and (a > b). The task is to check if difference of their areas is prime or not. Here… Read More »

## Program to Convert Hexadecimal Number to Binary

Given a Hexadecimal number as an input, the task is to convert that number to Binary number. Examples: Input: Hexadecimal = 1AC5 Output: Binary =… Read More »