Skip to content

Tag Archives: Modular Arithmetic

Given three positive integers A, B, and N, which represent a linear congruence of the form AX=B (mod N), the task is to print all… Read More
Given three non-negative integers A, B, and N where A is non-zero, the task is to find the number of integers less than or equal… Read More
Given a positive intege N, the task is to find the number of relations that are neither reflexive nor irreflexive on a set of first… Read More
Given three integers L, R, and N, the task is to find the minimum possible value of (i * j) % N, where L ≤… Read More
Given a positive integer H, the task is to find the number of possible Binary Search Trees of height H consisting of the first (H… Read More
Given an array arr[] of size N, consisting of N / 2 even and odd integers each, and an integer K, the task is to… Read More
In programming, the modulo operation gives the remainder or signed remainder of a division, after one integer is divided by another integer. It is one… Read More
Given an array arr[] consisting of N odd integers, the task is to count the different number of ways to make the product of all… Read More
Given three positive integers X, Y, and N, such that Y < X, the task is to find the largest number from the range [0,… Read More
Given two arrays A[] and B[] consisting of N integers, the task is to minimize the total cost of incrementing or decrementing array elements by… Read More
Given an array, arr[] of size N and a positive integer M, the task is to find the maximum subarray product modulo M and the… Read More
Given an array arr[] consisting of N positive integers, the task is to find the maximum value of ∑(M mod arr[i]), where arr[i] is any… Read More
Competitive Programming is vital for one’s development in the coding field. This article is going to discuss some basics points one should keep in mind… Read More