# Tag Archives: large-numbers

## Longest subsequence of a number having same left and right rotation

Given a numeric string S, the task is to find the maximum length of a subsequence having its left rotation equal to its right rotation.… Read More »

## How to store a very large number of more than 100 digits in C++

Given an integer N in form of string str consisting of more than 100 digits, the task is to store the value for performing an… Read More »

## Check if a large number is divisible by a number which is a power of 2

Given a large number in the form of a string str and a number K, the task is to check if the number formed by… Read More »

## How to generate Large Prime numbers for RSA Algorithm

The security of the RSA algorithm is based on the difficulty of factorizing very large numbers. The setup of an RSA cryptosystem involves the generation… Read More »

## Print all K digit repeating numbers in a very large number

Given a very large number N in form of string and a number K, the task is to print all the K-digit repeating numbers whose… Read More »

## Factorial of Large numbers using Logarithmic identity

Given a very large number N, the task is to find the factorial of the number using Log. Factorial of a non-negative integer is the… Read More »

## Check whether a large number is divisible by 53 or not

Given a large number in the form of a string N, the task is to check whether the number is divisible by 53 or not.… Read More »

## Fermat’s Factorization method for large numbers

Given a large number N, the task is to divide this number into a product of two factors, using Fermat’s Factorisation method. Examples Input: N… Read More »

## Digital Root of a given large integer using Recursion

The digital root of a positive integer is found by summing the digits of the integer. If the resulting value is a single digit then… Read More »

## Find smallest possible Number from a given large Number with same count of digits

Given a number K of length N, the task is to find the smallest possible number that can be formed from K of N digits… Read More »

## Round the given number to nearest multiple of 10 | Set-2

Given a large positive integer represented as a string str. The task is to round this number to the nearest multiple of 10. Examples: Input:… Read More »

## Find N % 4 (Remainder with 4) for a large value of N

Given a string str representing a large integer, the task is to find the result of N % 4. Examples: Input: N = 81 Output:… Read More »

## Sum of first N natural numbers when N is extremely large

Given a positive integer n, the task is to find the sum of the first n natural numbers given that n is very large (1… Read More »

## Check if a large number is divisible by 75 or not

Given a very large number in the form of a string, the task is to check if the number is divisible by 75 or not.… Read More »

## Check if a large number is divisible by 2, 3 and 5 or not

Given a number, the task is to check if a number is divisible by 2, 3 and 5 or not. The input number may be… Read More »