Skip to content

Tag Archives: number-theory

Given two arrays A[] and B[], both consisting of N positive integers, an integer P and the elements of the array A[] are pairwise co-prime, the… Read More
Given two positive integers N and X, the task is to count the occurrences of the given integer X in an N-length square matrix generated… Read More
Given two positive integers N and X, the task is to count the occurrences of the given integer X in an N-length square matrix generated… Read More
Given a number N, the task is to count the minimum number of digits to be removed from N to make it divisible by 4.… Read More
Given an array arr[] of size N, the task is to find the number of non-empty subsets present in the array such that every element(… Read More
Given an array arr[] consisting of N integers, the task is to count the number of integers in the range [1, arr[i]] that does not… Read More
Given an array arr[] consisting of N integers, the task is to find the integers whose digits are anagrams of each other and print the… Read More
Given an array arr[] of size N, the task is to maximize the count of distinct array elements by repeatedly inserting the absolute difference between… Read More
Given a list arr[] consisting of arrays of varying lengths, the task is to find the maximum product that can be formed by taking exactly… Read More
Given two positive integers N and X, the task is to find the smallest divisor of N which is closest to X. Examples: Input: N… Read More
Given an integer N and an array arr[], the task is to check if a sequence of first N natural numbers, i.e. {1, 2, 3,… Read More
Given two positive integers P and Q, the task is to largest divisor of P which is not divisible by Q. Examples: Input: P =… Read More
Given integer N and integer S, the task is to find the smallest number greater than or equal to N such that the sum of… Read More
Given an integer N which needs to be present as a value in a node in the last level of a Tree rooted at 1… Read More