Skip to content

Tag Archives: number-theory

The Mobius inversion formula is a technique used in number theory to find the inverse of an arithmetic function. It is based on the Mobius… Read More
Given an array arr[] consisting of positive integers and an integer K, the task is to find the minimum number of operations required to make… Read More
Given an array, arr[] of size N, Given M queries and each query consisting of a number X, the task is to subtract X from… Read More
Given an array arr[] of positive integers of size N, the task is to find the minimum possible size of the array that can be… Read More
Given a number N, the task is to check whether N has 7 divisors or not. Examples: Input: 64Output: 1 Explanation: 1, 2, 4, 8, 16,… Read More
Given two numbers N and K. The task is to check whether N is Kth power to any integer i.e., whether N can be expressed… Read More
Given a Non-Negative integer N, denoting the first 2N positive integers where consecutive integers starting from 1 are paired with each other, the task is… Read More
Given a range [L, R] and an integer K, the task is to check if it is possible to make the GCD of all integers… Read More
Given an integer N, the task is to find the sum of all values of N after repeatedly dividing it with its smallest factor. Examples:… Read More
Given three integers L, R, and K. Consider an array arr[] consisting of all the elements from L to R, the task is to check… Read More
Given two integers P and Q, the task is to find any two integers whose Greatest Common Divisor(GCD) is P and the difference between their… Read More
Given an array arr[] consisting of n distinct positive integers. Find the length of the largest subset in the given array which sums to a… Read More
Given two positive integers N and K. The task is to find the Kth number that can be written as the sum of different non-negative… Read More
Number System is a method of representing numbers on the number line with the help of a set of symbols and rules. These symbols range… Read More
Given a positive integer N, the task is to generate N random hexadecimal integers. Examples: Input: N = 3Output:F9AD0D9E19B24CD01A5E   Approach: The given problem can… Read More

Start Your Coding Journey Now!