Skip to content

Tag Archives: number-theory

Apart from Sieve of Eratosthenes method to generate Prime numbers, we can implement a new Algorithm for generating prime numbers from 1 to N. It… Read More
There are two players P1 and P2 and two piles of coins consisting of M and N coins respectively. At each turn, a player can… Read More
Given a number X and an array of N numbers. The task is to print all the numbers in the array whose set of prime… Read More
Given a 3-digit number N, the task is to find if N is an Osiris number or not. Osiris numbers are the numbers that are… Read More
Given an integer n, the task is to check if n is a Dudeney number or not. A Dudeney number is a positive integer that… Read More
Given an integer N, the task is to check if N is a Dihedral prime number or not. A Dihedral prime is a prime number… Read More
Given three integer n, m and k. Find the element at kth position after repeating the given operation n number of times. In a single… Read More
Given an array arr[] of size N. The task is to find the length of the longest subsequence from the given array such that the… Read More
Given an array arr[] of integers of size n. For each element, you have to print the summation of multiplication of every triplet formed using… Read More
Given an integer N, the task is to find whether fact(N) is divisible by sum(N) where fact(N) is the factorial of N and sum(N) =… Read More
Given an integer N(1<=N<=10^9). The task is to represent N as a sum of the maximum possible number of composite summands and print this maximum… Read More
Given a number. The task is to count the number of Trailing Zero in Binary representation of a number using bitset.Examples:   Input : N =… Read More
Given an integer N. The following tasks are performed:   The number is noted. The leading digit from N is subtracted from N and the resulting… Read More
Given a number n, the task is to count all rotations of the given number which are odd and even. Examples:   Input: n = 1234 Output:… Read More

Start Your Coding Journey Now!